Algorithm and voltage monitoring

Hi,

I am monitoring the voltage across the resistor and needs to maintain it steady at set point value. Let=92s suppose if the set point value is

100 volts peak to peak and if the voltage goes below this value or above this value than I have to make MOSFETS turn ON and OFF using pulse width modulation to keep the voltage steady.

Right now, I am reading the voltage across the coil and doing =93if else=94 statements to see whether the voltage is right and make adjustments accordingly.

My question is

Is this algorithm of using =93if else=94 algorithm is enough or should I be controlling the voltage using like control algorithm like PID controller etc.

Regards,

john

Reply to
john1987
Loading thread data ...

What capability does you hardware have?

Reply to
Richard Henry

Hi,

The microprocessor has an 12 BIT, 400Ksps ADC and four I/O ports available. It's clock is 50MHz. Is that what you wanted to know. Please let me know.

Thanks John

Reply to
john1987

I did a PID in a cygnal 8051 micro once, It can work. You'll have to figure out what bandwidth you need. Your probably looking at a 2-3 kHz of bandwidth that the PID can work in with a 50 mhz core clock. Get a book on PID algorithms.

Cheers

Reply to
Martin Riddle

Hi,

I guessed that I should have asked this question in the beginning that what advantage the PID would have over just if else implementation?

John

Reply to
john1987

This is not easy for me to describe. Firstly, precision of your description, you mention monitoring voltage across a resistor and reading voltage across a coil. Too sloppy.

You need more discipline in describing what it is that you're doing.

Quite likely I recognise that because I have similar problem? :)

Enough for what? You don't describe your system, put up a circuit, and are a bit too vague.

You know what the three terms PID are? What each does? You don't mention timing, so at the moment you're asking if proportional control is enough?

It may be, but you've not stated what the controlled process is, whether you need to seek to setpoint accurately (I), and whether you need to control the approach towards that setpoint (D).

And, is there a problem with system stability or response now?

Have you built the system, or planning it?

Grant.

Reply to
Grant

It'll actually work far more often.

--

Tim Wescott Wescott Design Services

formatting link

Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at

formatting link

Reply to
Tim Wescott

Depending on what "make adjustments accordingly" translates to, you're working on something that might work.

Do a PID, get it right, and you'll be working on something that _will_ work. Assuming, of course, that all the rest of the system is right -- but if the rest of the system is screwed up, then some oddball hybrid bang-bang controller is going to have less of a chance at it than even a simple PID controller.

While it lasts: dpm1480.pbworks.com/f/PID%20without%20a%20PhD.pdf.

eetimes.com has moved things around; they've put all the interesting stuff behind an email harvester. Dang!!

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" was written for you.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott

Nope, dead link ;( and not even a half hour.

Cheers

Reply to
Martin Riddle

Worked for me here just a moment ago...

--
Dave Platt                                    AE6EO
Friends of Jade Warrior home page:  http://www.radagast.org/jade-warrior
  I do _not_ wish to receive unsolicited commercial email, and I will
     boycott any company which has the gall to send me such ads!
Reply to
Dave Platt

It worked for me too. Thanks

John

Reply to
john1987

Just worked for me. Email me and I'll forward it.

Grant.

Reply to
Grant

Nice article. Repeating your link:

formatting link

Ed

Reply to
ehsjr

I wanted to know what controls you had over the power you are controlling - how many, how attached to the power source and the device under control, discrete or analog ocntrols, etc.

Reply to
Richard Henry

Hi,

I am controlling the power via H bridge 4081A and four mosfets. Basically controlling the current via PWM using micro.

John

Reply to
john1987

What coil? And this is AC so you can only sample around the peaks.

It depends critically on the load. If the load current is likely to vary suddenly or is non-linear with applied voltage like a filament then you are probably better off with a PID using control based on whatever it is you actually want controlled out of the other end.

Until you decide how closely you *need* the thing regulated your question is impossible to answer. How noisy is the line? etc.

Regards, Martin Brown

Reply to
Martin Brown

Isn't this bass-ackwards? Constant voltage power supplies are almost as common as dirt. "Peak-to-peak"??? That hints of AC. Well, a constant AC voltage can also be had; not exactly as common as a DC constant voltage as one might presume at the start of the question. In either event, turning a supply on and off certainly does not lend to a result that could, by any stretch of imagination, as being "constant".

Reply to
Robert Baer

Hi,

The other important question that I have is that how can I calculate that how fast my digital system can response to the input. What I meant to say that the ADC on the micro. detects the voltage across the ressitor or coil and then increase or decrease the current accordingly. I just do need to know that what parameters I need to take into account to keep the feed back loop reacts as fast as possible while designing it. I want to calculate it before I start building the system.

Thanks

John

Reply to
john1987

Days later and it works for me. Sasved a copy.

Reply to
JosephKK

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.