Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 23:52 26 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Electronics : Nano Power Inverter - Roll Your Own Style

     Page 10 of 16    
Author Message
wiseguy

Guru

Joined: 21/06/2018
Location: Australia
Posts: 1156
Posted: 12:27am 21 Oct 2021
Copy link to clipboard 
Print this post

Peter, I'm currently at work today so can't give your latest posts (or Tonys comments) my full attention & a considered reply. After scanning your explanation I have a query.
When the output is equal to the setpoint during ramp up why not truncate the rampup and bang bang control (I only got 1 bang - tongue in cheek.....) and jump straight into PID.
Another comment is/should the PID be set to some initial values to eliminate an instantaneous large derivative type correction.

I can assure Tony that this is not auxiliary gate supplies or other such issues the power supplies are all rock solid well before any of the fun starts.

Thanks again also for your ongoing explanations help & support.
Edited 2021-10-21 10:37 by wiseguy
If at first you dont succeed, I suggest you avoid sky diving....
Cheers Mike
 
poida

Guru

Joined: 02/02/2017
Location: Australia
Posts: 1418
Posted: 02:56am 21 Oct 2021
Copy link to clipboard 
Print this post

WG,
the PID is seeded with close to correct values of setpoint and output
which means only small correction is needed after the first
run through the PID code.

this runs after soft start is completed.

if (sst == 251)       // once sst = 251, run PID. the above bang-bang control will NOT have executed, because sst = 251
       {                  
       Setpoint = ac_setpoint;    
       Input = ac_output;  
       do_pid();
       pwr = pwr + Output;
       }


Immediately once completed we will have
ac_setpoint = 0.55 as always
ac_output will be close to 0.55, a little more or less

The PID code will see a very small error, call that E

E = ac_setpoint - ac_output

and then work out a correction (Output)
Output = E x 0.1 + delta_E x 0.01
Since this is the first time PID code was called,
delta_E = E as well.

There has never been a large jump resulting from going from bang/bang to PID
and this always occurs when sst = 251 or 2.5 seconds after soft start is initiated
when starting from scratch.

Let's say we are playing with it and soft start, run for 10 seconds then
stop it for 1 second. At that point 1 second after stop command, sst = 150
and the inverter will have taken 100 of those 1/250ths of max power away
from pwr.

for argument's sake we need pwr = 0.8 to give 240V AC output.
(this is sensible, it lets PWM modulation increase a further 20% to allow for voltage drops in the system)

So we command inverter to stop, after 1 second pwr went from 0.8 down to
0.8 - (100/250) = 0.4
All well and good.
We command it to run. sst = 150 now, pwr = 0.4
and sst is incremented, pwr is incremented by 1/250 and the
setpoint & output voltage comparison test is performed.
100 times a second.
Soon pwr gets to 0.8 and then bang/bang control asserts itself
which is adding or subtracting 1/250 to pwr as needed to maintain output voltage.
Finally sst gets to 251 and PID takes over, again with good seed values.

Every time the inverter is started (run command asserted)
the PID values (last error, error integral) are initialised to zero.
This means the first call into PID code will have a sensible
error derivative and error integral.
wronger than a phone book full of wrong phone numbers
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 03:02am 21 Oct 2021
Copy link to clipboard 
Print this post

Quote from Poida

"It looks smooth doesn't it.
But it's not.
Each 1/2 cycle, the peak increases by one.
The increase is made when the curve is crossing zero,
just as in the nanoverter code.
It has to increase sometime, somewhere in the curve or else there will be no ramp up.
Below is the rate of change of voltage at any one time.
(the derivative)
I think the inverter output when unloaded is best modeled as a reactive load
and so there is some inductive component.
Inductors are sensitive to rate of change of voltage."

Agree. For an inductor the best place to make the increments is at the current zero crossings not the voltage zero crossings.
Makes it a bit more complicated, using feedback from the current sensing circuit. At the start of the ramp the current may be too low to accurately identify the zero crossings so at first use the + and - peaks of the voltage wave form as the step points. After a few cycles change to current sensing. The voltage waveform will be ragged but the current waveform smoother.
 
wiseguy

Guru

Joined: 21/06/2018
Location: Australia
Posts: 1156
Posted: 03:16pm 21 Oct 2021
Copy link to clipboard 
Print this post

  poida said  
Let's look at some code:

if(uf == 1  )    // this will execute at 100Hz
if(uf == 1 && v1low == 1)    // this will execute at 50Hz  //My WG Code
     {            // it runs at near zero volt crossing of AC output      
     uf=0;
     ac_setpoint = 0.55;       // for same Vfb as EG8010. change AC output voltage via Vfb voltage divider trimpot
     if (oen == 1) sst++;      // slow start. If output is enabled, keep starting up. sst = output pwm% or approx. voltage.
     if (sst > 251)sst = 251;  // stop increasing when sst has got to the end of slow start. when = 251, this enables PID. See below..
     if (oen == 0) sst--;      // if stopping, slow stop
     if (sst <= 0)             // once fully stopped, no more changes to sst needed
       {
       sst = 0;
       cbi(PORTD,5);     // pull IR2184 shutdown LOW to disable gate drive output
       }
     else
       sbi(PORTD,5);     // pull it HIGH, to enable output

&

if(sst > 0 && sst < 250)     // slow start timer counts to 250 with gentle ramp up, then switches over to PID control. (gulp!)
       {                          // sst can increase or decrease, giving the slow start and slow stop.
       if (oen == 1)              // slow start? I think of it as de-gauss
         {
         if(ac_output < ac_setpoint)
           pwr += 1.0/250.0;     // bang-bang control, should AC output reach setpoint prior to PID.
         else                    // During slow start need to ensure output is tracking setpoint
           pwr -= 1.0/250.0;     // should output get close enough to matter.
         }
       else
         pwr -= 1.0 /250.0;      // this will execute in slow stop
       }







I have looked at this again & again until my head hurts, I want to write in my words what I think you are saying as it may be easier for you to see where/if I dont get it.

The code I run is based on your "nano_1_v5_sync_pid_50Hz_update_WG | Arduino1.8.13"
Which I believe makes changes every 20mS not every 10mS

You scale the power level from 0 - 100% is equal to 0 - 250 steps ?
Each count in soft start, heading for max count 250 = 10 millisecs. but power level in my code changes every 20mSecs ?

When Vout >= Vsetpoint then power reduces by 1/250 - for me twice during that 20mSec cycle ? meaning my power level reduced by 2/250 for each complete cycle ?  Power will only be reduced 2/250 or so until Vout <= Vsetpoint.

Does this mean that in your normal code you can have 250 10mSec adjustments, but my code will only have 125 20mSec adjustments ?

So during soft start, if/when Vout >= Vsetpoint the power level which was climbing each step towards 250 will cease climbing & toggle ~ +/- 1 count although the counter is still climbing every 10mSecs. until counter reaches 250.

When counter finally reaches 250 then PID starts?
Edited 2021-10-22 01:24 by wiseguy
If at first you dont succeed, I suggest you avoid sky diving....
Cheers Mike
 
poida

Guru

Joined: 02/02/2017
Location: Australia
Posts: 1418
Posted: 10:20pm 21 Oct 2021
Copy link to clipboard 
Print this post

This discussion is for custom firmware I made for WG.
It does not apply to any other code of mine for the nanoverter.

The code I run is based on your "nano_1_v5_sync_pid_50Hz_update_WG | Arduino1.8.13"
Which I believe makes changes every 20mS not every 10mS
Yes. It also means soft start is slower
probably 5 seconds long now


You scale the power level from 0 - 100% is equal to 0 - 250 steps ?
Yes, this means the power will increase or decrease
in these 1/250th step sizes during soft start and soft stop.


Each count in soft start, heading for max count 250 = 10 millisecs. but power level in my code changes every 20mSecs ?

The control loop runs at 50Hz or 20ms.
At this time the change to pwm is calculated and stored in a global
variable that the 20kHz PWM interrupt code immediately uses as the
new pwm duty cycle width.
So that means the change to pwm width occurs at 50Hz,
during a zero cross of the AC output voltage.


When Vout >= Vsetpoint then power reduces by 1/250 - for me twice during that 20mSec cycle ? meaning my power level reduced by 2/250 for each complete cycle ?  Power will only be reduced 2/250 or so until Vout <= Vsetpoint.


DURING SOFT START & SOFT STOP:
When Vout >= Vsetpoint power is changed by one 1/250th each time through control loop
and your code loops at 50Hz or 20ms

Not 2x.

Since Vout increases at one step at a time through the control loop
it will not overshoot much and be easy to control to bring back to
Vsetpoint

DURING PID CONTROL:

The power could be changed by larger amounts
from one run through the control loop due to the nature of
the PID.


Does this mean that in your normal code you can have 250 10mSec adjustments, but my code will only have 125 20mSec adjustments ?


Your code has potentially 250 20 ms adjustments during soft start/stop.

sst maxes out to 251 just as in all other versions.
Your code runs at 50Hz or 20ms

I expect soft start to reach your Vsetpoint before the end of soft start.
I do not know when, it's a factor of DC supply voltage, toroid turn ratio and AC output voltage setpoint.

Let's say DC is 50V, toroid has 27V AC RMS on it at 240V AC RMS output which is your setpoint.

27V AC RMS = 1.414 * 27 V peak to peak AC = 38.18V
The DC is 50V we need only 38.18 to get the AC setpoint.
So duty cycle width is 38.18/50 = 0.76

The variable named "pwr" would get to 0.76 with the AC output of 240V AC RMS

0.76 / (1/250) = 190 steps of the 1/250 power level increment

The soft start would keep incrementing sst to about 190 before
it stopped increasing pwr and just maintain pwr at about 0.76
(and AC output at 240V).
sst would continue to increase up to 251 then stop the soft start/stop process
and let PID take over.



So during soft start, if/when Vout >= Vsetpoint the power level which was climbing each step towards 250 will cease climbing & toggle ~ +/- 1 count although the counter is still climbing every 10mSecs. until counter reaches 250.


exactly right.
Except it's at 20ms


When counter finally reaches 250 then PID starts?


yup.

wronger than a phone book full of wrong phone numbers
 
wiseguy

Guru

Joined: 21/06/2018
Location: Australia
Posts: 1156
Posted: 01:47am 22 Oct 2021
Copy link to clipboard 
Print this post

Thanks Peter, the mist is slowly lifting, I also now understand why my ramp up looks like more than 4+ seconds where you were stating ~ 2.5 Secs for your normal code.

If I wanted my soft start to also be ~ 2 - 2.5 Secs, I assume by making some subtle changes here and there from 250 & 251 down to 125/126 or even  100/101 I can have a snappier start up?

I'm not asking you to take any responsibility for my playing and the ensuing success or failure of the result. Just an in principle agreement - If I decide to make the change and am feeling at all worried, I will bounce my changes off you first.

Should I change my PID dT which I think appears to 10mSecs & called at 100Hz  to .02 or 50Hz to match my power adjustments? - Not sure if it is making double adjustments per cycle in my case ??
If at first you dont succeed, I suggest you avoid sky diving....
Cheers Mike
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 04:36am 22 Oct 2021
Copy link to clipboard 
Print this post

Another theory on the "Grunt".
Looking through an old text on AC machines with respect to step changes in voltage causing a DC current component. Due to the very low DC resistance of the primary this can rise over a dozen or so cycles to saturation. At this point the inductance drops causing the current to rise further.
In your case the step changes are very small but by doing them exactly once per cycle they are cumulative, whereas doing them at every half cycle causes them to cancel. If you don't want to use 10mS then use 30mS. 20mS is the worst choice for a 50Hz inverter.
If you run a simulation like Poida's to show the current with the steps at 20mS you will see what I mean.

Phil
 
wiseguy

Guru

Joined: 21/06/2018
Location: Australia
Posts: 1156
Posted: 06:28am 22 Oct 2021
Copy link to clipboard 
Print this post

  phil99 said  Another theory on the "Grunt".
Looking through an old text on AC machines with respect to step changes in voltage causing a DC current component. Due to the very low DC resistance of the primary this can rise over a dozen or so cycles to saturation. At this point the inductance drops causing the current to rise further.
In your case the step changes are very small but by doing them exactly once per cycle they are cumulative, whereas doing them at every half cycle causes them to cancel. If you don't want to use 10mS then use 30mS. 20mS is the worst choice for a 50Hz inverter.
If you run a simulation like Poida's to show the current with the steps at 20mS you will see what I mean.

Phil


Thanks for your reply & suggestion, yes when an inductor becomes saturated it essentially becomes a short and the only limit to current is the winding's inherent resistance which in a Toroid is very low.

I understand your comments and thinking, but as I see it for each step change that applies over a whole cycle, there should be equal positive and negative flux swings, first for 0-180 and then 180-360 which should result in a net zero flux or essentially no accumulated bias of flux.

The next power level step increase should lead again to small increased but balanced flux swings for the whole 360 degree 2 half cycle parts. As Poida commented there must be cumulative increasing flux levels to ramp up the voltage. We need to ensure though that the sum of all the 0-180 flux levels is equal to the sum of all the 180 - 360 flux levels, over any whole number of cycles to avoid flux walking.

If the positive swings have a slight bias stronger than the negative swings we will accumulate flux and it could lead to saturation on a positive cycle in this case.
If at first you dont succeed, I suggest you avoid sky diving....
Cheers Mike
 
poida

Guru

Joined: 02/02/2017
Location: Australia
Posts: 1418
Posted: 07:35am 22 Oct 2021
Copy link to clipboard 
Print this post

  wiseguy said  Thanks Peter, the mist is slowly lifting, I also now understand why my ramp up looks like more than 4+ seconds where you were stating ~ 2.5 Secs for your normal code.

If I wanted my soft start to also be ~ 2 - 2.5 Secs, I assume by making some subtle changes here and there from 250 & 251 down to 125/126 or even  100/101 I can have a snappier start up?

I'm not asking you to take any responsibility for my playing and the ensuing success or failure of the result. Just an in principle agreement - If I decide to make the change and am feeling at all worried, I will bounce my changes off you first.

Should I change my PID dT which I think appears to 10mSecs & called at 100Hz  to .02 or 50Hz to match my power adjustments? - Not sure if it is making double adjustments per cycle in my case ??


sure, i can make changes to the code so it counts to 100 or something, not 250
during the soft start.

The PID time constant is a bit slow and that is good when we are looking at other problems. Transient Response Time is something to look at after you are happy with other things.

We could increase Kd and Kp in the PID calcs by x2 but not yet and not worth the hassle.

I am thinking I could add a new thing to the menu, to allow
to define the time soft start will take.
0.5 to 5 seconds or something. It could be fun to play with that.

Phill99 has given me good food for thought.

The imbalance of the primary drive during soft start was inherent in the design.
It must come from an increasing AC source. There is no way you can increase it
without giving one cycle (choose wisely which cycle! it just wont matter)
or another to give the extra current.

I always thought it could deal with it for a few cycles, as the DC resistance of
the primary winding and MOSFET & choke circuit will dissipate the DC bias in heat.

The test inverters I play with on the bench show, repeatably too,
that some toroids give me hum during startup and others are nearly silent.
I could reduce the hum from the noisy one with a 1 or 2 cycle bias in PWM
in one or other direction. This is 1 part is 300 or 1 in 600.
Not a lot.

To add this bias means the AC power waveform is shifted up or down with respect to a
zero voltage - e.g. negative peak is + 0.1 volt compared with the positive peak
Not a lot is needed due to the cumulative nature as described by Phill99

I found operating power loss (under zero load) was reduced by a measurable amount.
Instead of 12 Watts it was 11 Watts.
This is not important in the scheme of things.

Friday. beer. etc.
wronger than a phone book full of wrong phone numbers
 
wiseguy

Guru

Joined: 21/06/2018
Location: Australia
Posts: 1156
Posted: 08:20am 22 Oct 2021
Copy link to clipboard 
Print this post

  phil99 said  Another theory on the "Grunt".
Looking through an old text on AC machines with respect to step changes in voltage causing a DC current component. Due to the very low DC resistance of the primary this can rise over a dozen or so cycles to saturation. At this point the inductance drops causing the current to rise further.
In your case the step changes are very small but by doing them exactly once per cycle they are cumulative, whereas doing them at every half cycle causes them to cancel. If you don't want to use 10mS then use 30mS. 20mS is the worst choice for a 50Hz inverter.
If you run a simulation like Poida's to show the current with the steps at 20mS you will see what I mean.

Phil


Phil sorry if I am sounding defensive or argumentive but if I am missing the point it needs to be driven home. I want to be not just on the same page but ensure we/I are both on the right page.

If flux level increments are applied each half cycle and each successive half cycle step is greater than the preceding step, then there is a flux cancellation of sorts but each "cancellation" is slightly greater than the preceding one ?

I'm not sure "step" is the best description to help understanding this AC waveform discussion, that sounds more like a discrete instantaneous jump or digital excursion, an amplitude increase I think describes better what is occurring.

After much thinking I will concede though that if we look at one of my suggested method of balanced 360 degree cycles, over the first 180 degrees of a new cycle there will be a flux increase that is not equal to the previous 180 degrees, even though the next 180 degrees will balance it.

So it took a while but I am slowly coming around to the question/theory it may be better during soft start to have smaller 1/2 increments each and every 180 degrees rather than a unit increment each 360 degrees. The incremental flux increase per half cycle may not be balanced but it should toggle back and forth at a bit reduced but ever increasing level still averaging ~ zero.
Edited 2021-10-22 19:07 by wiseguy
If at first you dont succeed, I suggest you avoid sky diving....
Cheers Mike
 
Warpspeed
Guru

Joined: 09/08/2007
Location: Australia
Posts: 4406
Posted: 10:15am 22 Oct 2021
Copy link to clipboard 
Print this post

What I think Phil is getting at is as follows:

+ve half cycle/-ve half cycle flux units.

1/2
3/4
5/6
7/8

Positive half cycles 1+3+5+7 flux units add up to 16 flux units

Negative half cycles 2+4+6+8 add up to 20 flux units.

The successive increments each half cycle do not cancel, but diverge.
What is needed is two identical half cycles, followed by two more identical half cycles notched up by one increment.

1/1
2/2
3/3
4/4

Incrementing every full cycle will also take twice as long, which is a further step in the right direction.
Edited 2021-10-22 20:22 by Warpspeed
Cheers,  Tony.
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 10:20am 22 Oct 2021
Copy link to clipboard 
Print this post

Poida's graph of the current illustrates what a step change is. the rising voltage trace looks smooth but even small deviations from a pure sinewave at the zero crossings produce jumps in the current. As long as they happen equally on both half cycles they cancel completely. If they only happen on one half cycle there will be a small residual current at the end of the cycle. When this occurs again on the next cycle the new residual will add to the first as it is the same polarity, and so on. This is equivalent to a rising DC current superimposed on a sinewave with rising amplitude. The primary has a fairly high impedance to the AC component but very low resistance to the DC component. Although the inductance slows the rate of rise of the DC component given time it will push the peaks of one side of the sinewave into saturation, making it worse.
Before Thyristors came along AC loads were controlled be Magnetic Amplifiers or Saturable Reactors using this principle.

Phil
 
wiseguy

Guru

Joined: 21/06/2018
Location: Australia
Posts: 1156
Posted: 01:53pm 22 Oct 2021
Copy link to clipboard 
Print this post

This is becoming an interesting discussion and there seems to be a mix of inputs and views, some I think are more correct than others.

Tony the simplified addition of the column A & column B flux units almost had me going until I wrote the following table. We cant ignore the sign of the flux units we are adding and we cant just add all of column A and compare it to column B because there are A>B and B<A interactions that also need to be considered ?

This is how I see what happens with half cycle flux increments.

flux increments          Residual Flux
A       B                      A        B
0       0                      0        0
1       2                     -1      +1
3       4                     -2      +2
5       6                     -3      +3
7       8                     -4      +4

First consideration there is an imaginary zero line between the flux increment columns as the flux is swinging + &- in its excursions so A is Neg half cycles B is Pos half cycles.

If we take the first flux increment as beginning at B0 we add -1 flux unit at A to the zero flux unit at B with a net result of residual flux at A of -1 flux unit.

In the second flux increment from A>B we added +2 flux units at B to oppose the -1 flux unit at A with a net result of residual flux at B of +1 flux unit.

In the third flux increment from B>A we added -3 flux units to oppose the +1 flux unit at B with a net result of residual flux at A of -2 flux units.

In the fourth flux increment from A>B we added +4 flux units at B to oppose the -2 flux units at A with a net result of residual flux at B of +2 flux unit.

In the fifth flux increment from B>A we added -5 flux units to oppose the +2 flux units at B with a net result of residual flux at A of -3 flux units.

In the sixth flux increment from A>B we added +6 flux units at B to oppose the -3 flux units at A with a net result of residual flux at B of +3 flux unit.

etc etc

So that is why I deduce that there is little difference between an increment each 360 degrees or an increment each 180 degrees.  It kind of looks the same and all comes out in the wash as I see it.

The way my brain is hardwired it prefers the simpler balanced 360 degree increments as easier to visualise & calculate, but I think the residual flux table above says there is really little difference, the second method is just a bit more abstract to work with.
If at first you dont succeed, I suggest you avoid sky diving....
Cheers Mike
 
wiseguy

Guru

Joined: 21/06/2018
Location: Australia
Posts: 1156
Posted: 02:12pm 22 Oct 2021
Copy link to clipboard 
Print this post

Peter I made the changes to ramp up in 100 cycles - a massive difference to the point of more scary. I did note that the grunt was a bit shorter lived so a small bonus  

I think the 120 version might "feel" better, I'll try it tomorrow.
If at first you dont succeed, I suggest you avoid sky diving....
Cheers Mike
 
Warpspeed
Guru

Joined: 09/08/2007
Location: Australia
Posts: 4406
Posted: 06:44pm 22 Oct 2021
Copy link to clipboard 
Print this post

Have to agree you are quite right Mike.

Another way to look at the whole thing would be to imagine capacitively coupling the voltage waveform into a resistive load.  There would be no resultant net dc shift when  the amplitude is gradually changed up or down.

Staircase saturation certainly does exist, and it can be a real problem if one half cycle is made larger in voltage than the other on a continuous basis.  But while its smoothly ramping the situation self corrects.

Just make absolutely sure your digital values are a true mirror image without any asymmetry.  Try ac coupling the voltage waveform across the primary and see if there is any residual dc.....

I also feel you are on the right track slowing down the ramp rate.
Demagnetisation is a gradual process that needs to be given time to work.
Cheers,  Tony.
 
wiseguy

Guru

Joined: 21/06/2018
Location: Australia
Posts: 1156
Posted: 10:27pm 22 Oct 2021
Copy link to clipboard 
Print this post

To be fair I decided to use a similar flux analysis to equal increments every 360 degrees and the result is a lot more scary - I think I just shot myself in the foot.  There is an old saying that if you torture figures long enough they will tell you anything you want to know - is this such an exercise ?

This is how I now see what happens with complete (360) cycle flux increments.

flux increments          Residual Flux
  A       B                      A       B
  0       0                       0      0
-1      +1                     -1      0
-2      +2                     -2      0
-3      +3                     -3      0
-4      +4                     -4      0


If we take the first flux increment as beginning at B0 we add -1 flux unit to B results in -1 at A and then swing +1 flux unit back to B we get a net result of residual flux at B of 0 flux after a -1 excursion at A.

If we take the second flux increment as beginning at B0 we add -2 flux units to B results in -2 at A and then swing +2 flux unit back to B we get a net result of residual flux at B of 0 flux after a -2 excursion at A.

If we take the third flux increment as beginning at B0 we add -3 flux units to B results in -3 at A and then swing +3 flux unit back to B we get a net result of residual flux at B of 0 flux after a -3 excursion at A.

If we take the fourth flux increment as beginning at B0 we add -4 flux units to B results in -4 at A and then swing +4 flux unit back to B we get a net result of residual flux at B of 0 flux after a -4 excursion at A.

If we take the fifth flux increment as beginning at B0 we add -5 flux units to B results in -5 at A and then swing +5 flux unit back to B we get a net result of residual flux at B of 0 flux after a -5 excursion at A.

etc etc

I am sure that I can see something scary going on with the momentary flux at A compared to B - maybe I have just found my grunt ??

Adding complete cycles leads to zero remnant flux on one half swing but there are 2 half swings to consider - I don't like the look of the other.

If this is what you were trying to say Phil - I finally got there.
Edited 2021-10-23 08:28 by wiseguy
If at first you dont succeed, I suggest you avoid sky diving....
Cheers Mike
 
Warpspeed
Guru

Joined: 09/08/2007
Location: Australia
Posts: 4406
Posted: 10:49pm 22 Oct 2021
Copy link to clipboard 
Print this post

An interesting test might be to integrate the voltage waveform from directly across the primary with a series resistor and very large capacitor.  
If there is any constant small residual dc voltage on the capacitor, that should be readily measurable with a multimeter on the millivolt range.

If the game is fair, the whole ramp up, ramp down thing should show that no net dc is being generated.
Cheers,  Tony.
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 11:19pm 22 Oct 2021
Copy link to clipboard 
Print this post

Poida's second graph is what I think the current waveform would look like.
If you imagine it without the steps on the negative side as happens when the increments are at 20mS, the increased current is only for the second half of the positive half cycles but lasts for the whole of the negative half cycle.
Re running Poida's simulation should show if I have got it wrong or not.
Better still do a real world test with 10mS and see if the grunt remains.

https://www.thebackshed.com/forum/uploads/poida/2021-10-21_091959_Capture1.PNG
 
poida

Guru

Joined: 02/02/2017
Location: Australia
Posts: 1418
Posted: 11:40pm 22 Oct 2021
Copy link to clipboard 
Print this post

  wiseguy said  Peter I made the changes to ramp up in 100 cycles - a massive difference to the point of more scary. I did note that the grunt was a bit shorter lived so a small bonus  

I think the 120 version might "feel" better, I'll try it tomorrow.


Living on the edge!

I'm very pleased to see you hacking at the code.

Here is the sound level of my test inverter.
57V DC, non-optimised DC balance.
A very typical setup, identical to the home inverter.

I used a sound level app to give some idea of the sound levels
during soft start and stop when unloaded.

here is the video.
https://youtu.be/s_J5Jq_0UVI
wronger than a phone book full of wrong phone numbers
 
wiseguy

Guru

Joined: 21/06/2018
Location: Australia
Posts: 1156
Posted: 01:37pm 23 Oct 2021
Copy link to clipboard 
Print this post

Poida, I have chickened out on setting (hacking) my nano to output higher pwm fundamental switching frequencies.

A mans gotta know his limitations....... I like my FETs just fine the way that they are its too much work to replace them if I get it wrong.

If you have the time could you please post for  me the few (minimum) changes that need to be made to the nano sketch for ~ 25kHz and ~ 40kHz pwm frequencies  still at ~ 50Hz.
The accuracy of the Frequencies are quite unimportant, somewhere in the ballpark or a street nearby

I am having a lot of fun trying all sorts of small tweaks to various parts of the code with varying results but I have only muffled the grunt a bit - I  havent nailed it yet. I have also found some solutions to making it somewhat worse.......
If at first you dont succeed, I suggest you avoid sky diving....
Cheers Mike
 
     Page 10 of 16    
Print this page
© JAQ Software 2024