Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help:Solar Pump

Status
Not open for further replies.

abicash

Member
Hello

I have developed a Solar driven Pump and am having a bit of a trouble in tuning the whole thing.

The algorithm works in 3 blocks

1) Sine PWM generation for driving Power MOSFETS : 6 PWM pulses sine weighted
2) MPPT using Solar voltage and current : Gets wattage and determines max power point
3)Variable frequency : to maintain constant V/F ratio on pump motor

I am observing that a small cloud cover in the sky renders the circuit dead and unusable. Whereas a healthy solar insolation guarantees optimum withdrawal of water.
Same thing happens in the evening.
I am powering the Microcontroller and the driver for MOSFETS through a branch of the 700Vdc panel. 400Vdc to be precise which powers an SMPS to get 15V for entire circuit

Whenever a cloud shadow falls on the PV panels, the MPPT starts acting and increases duty and so the panel voltage reduces.
But once it drops below minimum required input SMPS voltage, the circuit restarts (SMPS off and on)
I have a soft start implemented as well , which increases the frequency 1 Hz at a time for 20 seconds after which the V/F ratio comes in picture. So in the evening when it is starting, i see water being drawn, but as soon as it quits Soft start and enters dynamic V/F ratio maintaining, the Panel voltage drops quite rapidly by increasing duty (since the algorithm is not able to determine the Max power yet)

I have checked my MPPT algorithm and i find that satisfactory.
So i am stuck here...Can someone help me?

Thanks in advance
 
If the panel is your sole source of power then you need to be ready for a cloud to come in and cut the power off. Once this happens, you need to wait for the cloud to pass and the sun to re-power your unit, including MCU. There are commercial pumps that work this way - pump when they can, do nothing when they can't.

If you don't like this, you need to add a battery to smooth out panel output. This will keep the pump running while a cloud passes. Then it's up to you to decide when to turn the pump on and off.
 
Hello Northguy

Thanks for replying.
My circuit takes care of the conditions you mentioned.
In late evenings , the unit fails to draw water.(conditions mentioned in earlier post)
I have seen some drives operating till late in evening (till sunlight is available, yet not substantial)
Battery is a strict no.

I don't understand why my circuit faces this problem.
i have calculated the V/F ratio based on thumb rule of 50Hz @ 400Vac, since i dont have any speed or torque feedback as such.
I only rely on Solar voltage which i convert to Vmotor-ac,and taking the factor of dutycycle, to determine/speculate the o/p ac voltage ->. Vmotor-ac.
Based on this voltage , i feed a frequency to the motor to keep V/F ratio constant.
Is this how its done in a Motor VFD?
 
So, you say you get some clouds over, but not too bad, and you believe your pump could still be working in these conditions, but it doesn't.

Assuming a buck topology, you would expect the MPPT controller to decrease the duty cycle in order to maintain the panel voltage. When you get a cloud, the MPPT point is just a little bit less (in terms of voltage) than it was in the full sun. But current drops down, may be 70% or more. To keep the voltage high, the duty cycle needs to decrease. If MPPT controller increases the duty cycle in such conditions, then this is, obviously, a bug in the MPPT controller. What algorithm do you use?
 
Hello
Posting on mobile phone.

I use a Perturb and observe algorithm.
Increase duty, check watts,if watts decreases, decrease duty.
I m concerned about my V/F algorithm.
I convert solar voltage to o/p rms voltage.
Vrms=(Vsol/root2)x duty%
Freq = Vrms/8
Is this right?
 
Increase duty, check watts,if watts decreases, decrease duty.

When it's cloudy it's getting darker at times and lighter when clouds pass.

Imagine it's getting darker and darker. You increase duty, watts decrease (because it got darker), you decrease duty back. So, when it is getting darker, your algorithm sits on the same place.

Now imagine it's getting lighter and lighter. You increase duty, watts increase (because it got lighter), you keep on increasing. So, when it is getting lighter, your algoritm increases the duty cycle.

Now imagine it's jumping back and forth. When it gets darker, your algorithm sits in place, when it gets lighter, your algorithm increases the duty cycle. As a result of such perturnations, when you get varying light conditions, your algorithm keeps on increasing duty cycle and never decreases it.

Is that what you observe?
 
Hello Nortguy
I am not sure, that happens.
You said
" (because it got
darker), you decrease
duty back."
You meant increase duty back?
Let me explain it again so u understand

1. Calculate currnt watts
2.check if currnt watts > =old watts
3.if yes, increase duty by 1%
4. if no, decrease duty by 1%
5. old watts = currnt watts
6. go to 1
 
1. Calculate currnt watts
2.check if currnt watts > =old watts
3.if yes, increase duty by 1%
4. if no, decrease duty by 1%
5. old watts = currnt watts
6. go to 1

Unlike your previous description, this doesn't seem to work at all.

Say, you need 500V for MPPT, and you're currently getting 400V. Say, you got an improvement on previous step.

1. 1000W
2. 1000W > 950W => do (3), skip (4)
3. You increase duty. this drops the voltage further, to 390V and decreases power to, say 950W
5. old watts 1000W
6. ...
1. 950W
2. 950W < 1000W skip (3), do (4)
4. decrease duty. This increases voltage back to 400V and increases power back to 1000W
5. old watts 950W
6. ...

After these 2 steps, we got back to where we started from. It'll be oscillating between 950W and 1000W. I don't see how it ever goes to higher voltages.
 
But isnt that the whole idea about?
To keep wattage at maximum power,
Keeping voltage unimportant?
If it isn't, can you propose a better algorithm?
 
But isnt that the whole idea about?
To keep wattage at maximum power,
Keeping voltage unimportant?

If you read my post #8, you will see that the algorithm you described doesn't keep the wattage at maximum, but rather gets stuck at lower wattages once the voltage drops below the MPPT point because of its inability to rise the voltage back to the MPPT levels.

If it isn't, can you propose a better algorithm?

For the start, if you implement perturb-and-observe correctly, it'll work. Your first description "Increase duty, check watts,if watts decreases, decrease duty" would work if you put it that way:

1. measure watts1
2. increase duty by 1%
3. measure watts2
4. if watts2 < watts1, decrease duty by 2%
5. goto 1

This will have issuers, but generally it'll work.

There are lots of different algorthms, most of them are better than perturb-and-observe. It all depends on what sensors you have installed and what your MCU capabilities are.
 
Hello Northguy

Thanks.i have a question.
How long do I wait between 2 & 3?

I only measure current and voltage.
And I have got a fairly powerful 8bit MCU
 
Thanks.i have a question.
How long do I wait between 2 & 3?

That's a tough question. You should wait until it stabilizes. With a pump adjusting to the voltage level at the same time, it may take much longer. But it's better to wait until it's stable. With perturb and observe it's better to be too slow than too fast.

I only measure current and voltage.
And I have got a fairly powerful 8bit MCU

I would assume both are on the load side. Without sensors on the panel side, it's hard do come up with a good algorithm.

If you don't have a partial shading (which would make things much more complicated), the MPPT point (in terms of voltage) depends mostly on the temperature (and a little bit on light conditions). So, the optimum voltage on the panel should be relatively stable around MPPT. With regular MPPT, battery voltage is almost fixed, so duty cycle is linear to the panel voltage. Therefore, the duty cycle would be relatively stable over time and you wouldn't need perturbing very often.

With the pump, the load voltage may vary. Therefore, to keep a stable MPPT voltage, you need to adjust your duty cycle. Much harder to do than a regular MPPT.

You can try to estimate panel voltage as load voltage divided by the duty cycle and try to keep it stable with slow perturbations (e.g. once a minute). At the same time, you can regulate your duty cycle and pump settings together depending on the power available at the pump in much faster scale to adjust for clouds etc.
 
Fortunately (or unfortunately) I measure
Solar Voltage
Solar Current
Motor current
Dont have data on Motor voltage.
Earlier I had a soft start ramp of around 15 seconds, on which duty was increased once every 50ms
Feed frequency at that particular voltage and then back again.
At about 120vac (Vsol/root2) I leave soft start.
Now I would wait 1ms to either increase or decrease duty.Simultaneously I feed frequency.
This seemed to work in good insolations, but failed after 17.30 hours. Also a big cloud for a larger time renders it useless (as u have explained)
I have converted your explanation for MPPT and as per your suggestion will perturb each minute.
But should I change the o/p frequency within same time?
 
So, you can measure solar voltage and vary your duty to keep it stable. You pick up a target voltage (which will represent an MPPT point). If you see your voltage going above the target, you increase the duty. If you see it going lower, you decrease the duty. You should do this as fast as possible (but not faster). This will take care of fast clouds etc.

Of course, you should make sure that you do not kill your pump in the process. So, if it is too much power, you forget about target voltage, decrease duty and let the panel voltage go above your target point.

About once a minute or so, you can perturb your target voltage, and, if necessary, change it according to the perturb&observe algorithm. This will take care of changes in the MPPT point.

On the load side, you will get varying voltage and current, so your pump needs to adjust its speed to meet the available power. I don't feel that my advise on regulating pumps would be valuable. Perhaps, somebody else can help with this part?
 
Hello Northguy

Today i am implementing your algorithm.

But instead of waiting for a considerable time , i do this within 1ms.

Here is the code for that

Code:
  ADC_Measure() ;
watts1 = solarvolt * solarcurrent;
                      DutyStep++;
                  
                     if (DutyStep > 99)DutyStep = 99;
                               delayms(1);
                 
                   ADC_Measure() ;
                 
                   watts2 = solarvolt * solarcurrent;
             
               if(watts2 < watts1)
                {
                  if(DutyStep>0)
                   {
                     DutyStep -=2;
                      delayms(1);
                    }
                 }

Sun is at its maximum current time (1.20pm).There is no cloud in sight.
Getting optimum result
Solar volt = 600VDC
Motorvolt = 360Vac
F=50Hz
Motor current = 7.5A ac

What do you feel about this?
Please comment

EDIT : This algorithm worked well till 5.15pm after which i decided to test its starting current. So i switched it off and on.
Now it starts(pumps water) but solar voltage drops below SMPS min i/p voltage, after 2-3
seconds so that the whole thing restarts. and loops continuosly.
Can you comment?
 
Last edited:
Ps = Vs*Is (s stands for solar)

Optimum power is reached when Vs = Vmp, which is relatively stable, depends mostly on the temperature and a little bit on the light conditions. MPPT algorithm is supposed to keep Vs at Vmp.

I changes up and down relatively fast with changing light conditions.

Therefore, Ps = Vs*Is also changes fast with light conditions, but not because Vmp is changing, but because Is is changing.

Normal MPPT carger connects it to battery and (roughly) Vb = d*Vs (b stands for battery, d is duty cycle), and therefore Vs = Vb/d. Vb is relatively stable, so Vs doesn't really depend on Is, only on d. Manipulations of duty cycle change Vs and are not affected by Vs.

What happens if we connact a load (resistive for simplicity). Now Ps = Pr = Vr*Ir (r stands for resistive load). Ohm's law: Vr = Ir*R. Therefore

Vs*Is = Ps = Ir^2*R.

Ir = Is/d.

So

Vs*Is = (Is/d)^2*R

or

Vs = Is/(d^2)*R

As you can see here Vs depends on Is, which is different from normal MPPT whee Vs = Vb/d. This means that when Is decreases, Vs goes down with the same duty cycle. Duty cycle is no longer proportional to the Vs and therefore cannot be controlled directly with the duty cycle, as would be the case with a battery.

When light changes, you see variations in Is and thus in Pr and the P&O algorithm reacts on them and adjusts the duty cycle, possibly in the wrong direction.

What I suggested in post #14 is this:

1. Pick up your Vmp - which is a proxy for real Vmp. It's somewhere around 600V on your system, I guess. Regulate d to keep Vs as cose to your Vmp as possible. If you see Vs above Vmp, increase your duty cycle. If you see it above Vmp, decrease your duty cycle. Or even easier. Abandon PWM. If it goes above Vmp by some small delta-V, turn your switch on, if it goes below Vmp by some small delta-V, turn your switch off. What you're accomplishing with this?

Vs = Is/(d^2)*R

You try to adjust d to varying Is in order to keep Vs at Vmp, which maximises solar power.

Why you do it fast? Because Is can change fast.

2. Vmp may change over time (temperature, light), but not march. It's a very slow process. You can use your P&O algorithm to adjust it. But you don't need to do this every 1ms. Do it every minute. Measure, Increase, Measure again (you can do it few times to make sure there's a consistent improvement with increase/decrease). You have plenty of time do do this, but you need to make sure it is not affected by noise and doesn't run away from good point as it does now. What you're accomplishing with this?

You try to track changes in Vmp during the day.

Why you do it slow? Because Vmp cannot change fast, but noise can.
 
Thank you for such a comprehensive post.Appreciated a lot.

First,i would like to reiterate that this goes as front end to a 3 phase inverter, having frequency changing ability.
I dont have any buck or boost converter in between.
By changing duty,i am changing duty of the inverter. by changing frequency I am changing inverter frequency.
If I change duty very slowly as you define, o/p voltage never increases
to run the pump.so I have a small delay.
The process runs in 2 tiers.
Tier 1 defines an MPPT voltage
Tier 2 defines o/p frequency to motor.

Please, if possible, explain an idea to do this with a minutes interval
Since I tested with 100ms delay and o/p voltage never reached 100vac, Vs was 600vdc
 
To get the maximum power from the panel you need to keep panel voltage at a fixed point close to 600V. This point is called MPPT. Production both below and above this point will be less. This optimum point is changing slowly over time, but it will never drift away too far from 600V. It is better to be slightly off that point than to have a risk of drifting too far away.

To keep panel voltage at MPPT, it must be somehow higher than the voltage at the load (and the difference should become greater when it becomes darker). For this to happen there should be some sort of inductance between the panel and the load. How do you maintain MPPT voltage high when your load voltage is low?
 
Hi NorthGuy

I have sized the Solar panels as per required Voltage and wattage.
23 panels each with Vmp = 30V and Power = 250W each.

So max power will naturally be around 600V as per wattage calculations.
As you have seen, i keep power to max, so inherently, voltage will be at max power voltage
I see this throughout the day.
My load is the Motor of the Pump.
My Inverter adjusts the voltage o/p of the inverter to max voltage according he power.
As sunlight decreases , the voltage decreases, and the o/p frequency is adjusted seamlessly.
Till 10 or 8 Hz it works.
Load draws current based on applied frequency (and voltage).So a mere duty adjustment corresponds to the voltage difference between i/p and o/p.
Does this all sound okay?
 
What you see when it's getting darker is that voltage falls. There could be 3 reasons for that:

1. It is simply not enough power (I still suspect this is the most probable cause)
2. Your MPPT algorithm cannot work in certain coditions.
3. Your design doesn't work with lower pump voltages.

Ir is easy to fix (2), it may be harder to fix (3), and it is nothing you can do about (1).

If I were you, I would try to figure out which one it is. The simplest thing is to change the MPPT algorithm so that instead of chasing power, it keeps constant 550 to 580V voltage at the panel. If it works in this configuration, then the algorithm is the problem and you need to work on the algorithm. If it doesn't work in this configuration then there's either (2) or (3). Can you do this experiment?

BTW: I have 24 panels - only one more than you do, and it's enough for the entire house :)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top