Controlling from flywhee using current mode control

H

Thread Starter

Hadé

I am having trouble to implement my control in software. I am using PIC18f4620 for that matter.

The flywheel is connecetd to a PMDC motor. My aim is to give constant output voltage to my load by sensing the average inductor current and output volatge. The whole integrated together is really giving me trouble. I have never on current mode control and I need to implement this in the days to come because my project is due soon. can anyone help how I can do code this properly. the flywheel max speed is 3000 rpm and the motor output voltage is 24V. I will be glad to get assistance.
 
R

Robert Scott

You still haven't said what there is that you can control to make the voltage constant. A normal PMDC motor will produce an open-circuit voltage that is proportional to the RPM.

Robert Scott
Real-Time Specialties
Embedded Systems Consulting
 
This is what I want to do. When a flywheel is discharging its stored energy, its speed decreases which results in its output voltage to decrease. However I would like to provide constant power to my load (say 20W or 30W) over a certain duration. This means I need to have a control system in place such that I can provide constant power (with constant output voltage). That is why I want to use current mode control with my PIC. I don't know if voltage control might not cause instability. The problem is I am having problem to implement my control properly in my PIC18f4620. I hope this explains more what I want to control.
 
R
As Robert Scott says, the output voltage will drop with speed because the field is fixed. Does your load require a lower voltage, e.g. 12? In which case, you could regulate using a typical switch-mode or series regulator.

We obviously miss the PIC18f4620 reference.

Roy
 
R

Robert Scott

If you consider the flywheel output as a discharging battery, then the problem is the same as with any other power supply with voltage regulation. Look up circuits that implement switch-mode power supplies, either buck or boost, depending on whether you need to drop the voltage or raise it. There are plenty of special-purpose chips to perform this function. You don't need to use a PIC to do it.

Robert Scott
Real-Time Specialties
Embedded Systems Consulting
 
Ok, but I am not really sure of how I should go about. I would want to use the PIC in order to sense my voltage and current and use some double loop digital controller for voltage regulation. The choice for the PIC is that I wanted to experience the digital control, however since under the constraint of time, I am just looking for a quicker solution.

I am using a boost converter for my circuit. My load is 24V load. About special chips for it, I am not sure of which one you're referring me to. Could you please mention the name of a chip for that? I am searching on it, but I would really appreciate if you could refer to a better reference.
 
Hi,

Could you tell me which special purpose IC would be better for that matter? I wanted to use the PIC in order to experience the digital control, however time is not on my side unless it can be implemented quickly and easily since my project is due soon. I will be glad to get guidance. Thanx.
 
R

Robert Scott

I am no power supply expert, and I don't know all the details of your application, so I can't suggest a specific chip. However if you pick up any copy of Electronics Design, or Electronics Product News, or EDN and look at the ads, you will see many ads from companies like Linear Technology, National Semiconductor, Maxim, for switch-mode power supply chips.

The design of a switch-mode power supply from the ground up is not a simple task, especially if you don't already have a background in magnetics. The choice of the inductor is critcal to the success of the design. You may have to rely on reference designs from the manufacturers. If time is really short, and if you only need to make one of these supplies, then perhaps you should skip the ground-up part and buy a ready-made switch-mode power supply module. Again, I don't have any specific references for you since the choice will depend on many facts that only you know.

Robert Scott
Real-Time Specialties
Embedded Systems Consulting
 
Hi,

Thanks for the clarification. As for magnetic design, I have some background on that. For my case I don't need to design an inductor since the motor's armature inductor will be used for my boost action. What I need now is how to control my system whether it manufacturers' chip or something else.

Thanks.
 
This is more of an electrical engineering problem than a mechanical one.

The problem restated is simply one of providing a constant output voltage from a source with a variable voltage. Switch mode power supplies do this by turning a transistor on and off quickly, this stores and releases energy in an inductor, and there is a diode in there somewhere.

So here are some more pieces to your puzzle:
(a) You always need a transistor, an inductor, and a diode
(b) You will also typically need capacitors, and a control chip of some sort
(c) The items in (a) can be arranged in many ways, to give different "topologies", in your case the 24v motor will be producing 24v initially then decay, so you need to "boost" the output with a "boost" topology to keep the output at 24v.
(d) Then you have the issue of how to control the timing of the transistor turning on and off, and there are various schemes for this, one of the methods is called "current control".

A fairly standard IC for current control is the UC3842 http://www.datasheetcatalog.com/datasheets_pdf/U/C/3/8/UC3842.shtml
http://www.nxp.com/acrobat_download/applicationnotes/AN1272.pdf

Essentially, if you think of the inductor as a bucket being used to bail out a leaking boat, then you fill the bucket to a level proportional to demand and then tip it out.

Here is a simple tutorial on SMPS that you may find very helpful.
http://www.national.com/AU/design/courses/250/

Current mode control is very simple, yet robust. To implement it with a microcontroller, you need to
(a) Measure your output voltage (e.g. 23V when you want 24V)
(b) Determine the error (e.g. 1V too low)
(c) Turn on the transistor
(d) Measure the current (in a fast loop) in the inductor, (or the switch transistor, usually easier because it's ground referenced--do this by measuring the voltage across a sensing resistor)
(e) Is the voltage across the sense resistor less than the error voltage? if yes loop to (d)
(f) Otherwise if the voltage across sense resistor is greater than the error voltage, turn off the transistor
(g) Wait for a fixed time, go back to (a)

With this control scheme, you will notice the average inductor current and on_time vary according to the load. If you are using a typical small motor, it will have an inductance of the order of millihenries, so your on times and off times will be in the order of 100microseconds to 1ms.

Linear technology have a useful app note, AN25,
http://www.linear.com/pc/downloadDocument.do?navId=H0,C1,C1154,C1002,C1223,P1209,D4120

The circuit in fig17 can be adapted to do your job. I can send you a sketch, just drop me a note at bobt1864 at gmail dot com

Cheers,

BobT
 
Thanks Bob,

In fact my motor inductance is 3.3mH from the manufacturer's data sheet. When implementing the system in PIC, how do we properly relate the duty cycle to the error signal? I think that is one of the parts that really confuses, especially the right controller for it. I have tried UC3843AN so far, but my closed loop is not ok. Maybe I'm not choosing proper sensing resistor or compensation network.
 
Top