Regulating speed/torque of induction motor - methods - Page 1
Forum section: electronics / general

author: nForce
author_rank: Frequent Contributor
timestamp: July 27, 2016, 10:46:48 pm
content: Hello,does anyone here also know something about the methods as FOC (Field oriented control) or DTC? I have some specific questions for the block diagram of these methods.Thank you.

author: tatus1969
author_rank: Super Contributor
timestamp: July 27, 2016, 11:48:21 pm
content: did a FOC motor controller based on STM32 / FOC SDK, just post your specific question.

author: nForce
author_rank: Frequent Contributor
timestamp: July 28, 2016, 06:26:52 pm
content: I have found this block diagram:from electrical4u site.I understand, that we measure current at just two phases (a,b). Then we transform these values from ab system with Clarkine transform to alpha, beta. And finally with Park transform to dq. But why are all 4 arrows pointing in the Park transform block. We should use these two (d and q values) in some sort to regulate the torque/speed charecterisics. And why we need inverse Park transform block? Where we also have billateral arrow connecting Park and Inverse Park transform.I have just started learning these block diagrams.Thank you.

author: tatus1969
author_rank: Super Contributor
timestamp: July 28, 2016, 07:31:00 pm
content: measuring only two phases gives already the full picture of all three phase currents, remember Kirchhoff nodal point set.The diagram that you have is not very clear, I think I have a better one:The idea of FOC is to maintain the current vector (hence the stator's magnetic field) exactly at 90 degrees with respect to the rotor's permanent magnet's magnetic field. This maximizes torque and efficiency.The d and q values represent exactly this current vector: when d == {commanded current} and q == 0, then we have reached 90 degrees with respect to the rotor.You see that the {d,q} vector will be rotating with the rotor, and the phase should be kept constant. This is what the two PI regulators (in the picture they are called "filters") are working on. They produce another vector {d_command, q_command} that represents the drivevoltageangle and amplitude that is required to achieve the 90 degrees current at the commanded level. Note that this new vector is also rotating with the rotor.Now you can see what all these transforms are doing:- The {a, b} currents have 120 degrees between them, the Clarke transform makes a nice orthogonal vector out of them --> {alpha, beta}- the Park transform converts the stator referenced {alpha, beta} into the rotating rotor coordinate system. This is a simple vector rotation, having given a shiny name- similarly, the Inverse Park converts the calculated {d_command, q_command} back from the rotating to the stationary coordinate system. You guess it, this is again a vector rotation, just taking the negative phase as the angle to rotate.- the SVPWM block takes the {alpha_command, beta_command} and calculates the three phase voltages that correspond to this vector phase and amplitude.As you see, this algorithm needs to know the rotor phase with respect to the stator. This is normally done using any of these:- sincos resolver- absolute encoder- incremental encoder- sensorless algorithm taking the stator currents as input and applying these to an electrical model of the motor, in order to predict the rotor phaseThe last two require some sort of startup mechanism, because both do not work from standstill (of course the encoder only once until the reference mark is hit). You can do this by adding hall sensors, or by using sort of stepper motor like startup.Hope I was clear enough, anyway feel free to ask more.

author: nForce
author_rank: Frequent Contributor
timestamp: July 29, 2016, 11:28:16 am
content: What function does the encoder have, where it is connected with Park transform block and Inverse Park transform block?Is the Space vector generator similar to inverse Clarke transform?Why do we need all these? Isn't there an analog or digital electronics component where we can measure current and control the AC motor.Danke

author: tatus1969
author_rank: Super Contributor
timestamp: July 29, 2016, 01:36:36 pm
content: Quote from: nForce on July 29, 2016, 11:28:16 amThe answers to these questions lie in my previous post.The encoder measures the rotor angle; in my post I give alternatives to that --> sensorless FOC.Inverse Clarke does a vector rotation, and the SVPWM algoritm calculates the three phase voltages from the orthogonal alpha/beta vector. But I know the subject is complex, maybe digest some the following:ww1.microchip.com/downloads/en/AppNotes/01162A.pdfhttps://en.wikipedia.org/wiki/Vector_control_(motor)http://www.roboteq.com/index.php/support/microbasic-reference/100-applications/how-to/359-field-oriented-control-foc-made-ultra-simplewww.st.com/resource/en/user_manual/cd00298474.pdfThe subject is quite complex, you have to spend some effort to master it. Another important aspect of FOC is that it always requires tuning of the two PI controllers. You have to adapt it to your motor, it doesn't run out of the box. There are advanced techniques that do this automatically, some of them even online (e.g. TIs insta-spinhttp://www.ti.com/ww/en/mcu/instaspin/instaspin-foc_architectures.shtml).Quote from: nForce on July 29, 2016, 11:28:16 amMeasuring phase currents does not give you the rotor position/angle. How should the algorithm know the right phase for the stator windings to spin the motor?Quote from: nForce on July 29, 2016, 11:28:16 amGerne

author: nForce
author_rank: Frequent Contributor
timestamp: July 29, 2016, 04:46:29 pm
content: How is this implemented? You said it's an algorithm. So if I use a microcontroller and write the code, and use some external parts like an encoder should work?If it's an algorithm. Why is this represented with block diagrams? What about flow diagram?

author: tatus1969
author_rank: Super Contributor
timestamp: July 29, 2016, 07:33:02 pm
content: Quote from: nForce on July 29, 2016, 04:46:29 pmIt is an algorithm. The block diagram shows the relationships of the major working variables.You can put this into a microcontroller on your own. On the other hand, there are numerous implementations of it, some of them open-source, and there are also open-source hardware projects. Have a look in the linked documents, they describe the mathematical background in detail. I can recommend this onehttp://vedder.se/2015/01/vesc-open-source-esc/, however I know the system still has problems with destroying MOSFETs when operated in FOC mode.Again, if you want to start with this, then you need to dig into quite some theory first. I can only give you an overview, maybe some directions, and answer specific questions.Can you tell me more about your intentions? Do you want to build some hardware from scratch, do you want to learn the theory behind, or do you just want to put things together to make them work?

author: nForce
author_rank: Frequent Contributor
timestamp: July 29, 2016, 08:24:22 pm
content: QuoteIs this standard in electrical engineering to represent the algorithm in such a way? Because I came from computer engineering to electrical, and I want to learn more about the theory.In Europe you can't patent a computer algorithm, maybe you can in USA. Because that wikipedia article contains block diagram which one engineer patent it. And it's from a year 1970. Back then we sure didn't have MATLAB.Do you understand also the Direct Torque Control and Field Weakining for DC motors?

author: tatus1969
author_rank: Super Contributor
timestamp: July 29, 2016, 10:08:50 pm
content: I am at home in both worlds, for me this is very common to see things like this, also in the software world. It is very easy to extract a flow chart from this block diagram. The boxes contain formulas, and the arrows indicate information flow. If you know Matlab, then you maybe also know Simulink. You could implement the algorithm in Simulink, and it would look pretty much the same.They probably chose a block diagram, because FOC is basically a (set of) control loops ->https://en.wikipedia.org/wiki/PID_controllerDTC (direct torque control) applies to AC motors, not to DC motors (to be precise: three phase permanent magnet synchronous motor, short: PMSM). ->https://en.wikipedia.org/wiki/Direct_torque_controlTotally different story, but the result is the same as with FOC: you can enter a torque command and the controller takes care of it.Field Weakening is a general capability of FOC, it's a bit over simplified but just set the commanded value for the "d" control loop to a nonzero value. This produces a current (and flux) component that does not contribute to torque generation, and only weakens the permanent magnet's flux. Lower resulting flux results in higher motor speed, which is the purpose of Field Weakening.

author: nForce
author_rank: Frequent Contributor
timestamp: July 30, 2016, 10:04:54 am
content: Yes, I have read the wikipedia articles, but there isn't clear enouqh for beginners.If we go back to the FOC. Do you know why we use PI regulator? Why not just P or PID?

author: tatus1969
author_rank: Super Contributor
timestamp: July 30, 2016, 10:27:43 am
content: Quote from: nForce on July 30, 2016, 10:04:54 amYou need to go into control theory here, and examine the system that we are controlling. The system basically is an inductor (the stator windings), and we control the current through that inductor with an adjustable voltage source (the inverter). This is a first-order control problem, and a PI controller is the best choice. A PID only has an advantage for higher-order systems.Again, Wikipedia is a good starting point:https://en.wikipedia.org/wiki/Proportional_controlYou'll see the disadvantage of pure P controllers there: the offset error.

author: nForce
author_rank: Frequent Contributor
timestamp: July 30, 2016, 03:28:47 pm
content: So FOC is in fact controlling the current through the stator winding which controlls the magnetic flux for which the rotor spins at the desired torque. For example if we need maximum torque then currents will be controlled in such way so that the magnetic field and the rotor will be 90 degrees apart. For that we need to measure the rotor position.But can we do better? I am looking at the scheme and I realized that the PI regulator understands only "d" and "q" parameter. Why is that?And again thanks, when I will fully understand the subject I will go to the direct torque controll.

author: C
author_rank: Super Contributor
timestamp: July 30, 2016, 08:07:02 pm
content: Might make more sense working backward.https://en.wikipedia.org/wiki/Induction_motorRotor RPM slower than Stator RPM = Torque.Greater Stator field strength = more torque available.Not using all of Stator field strength = power waste.The control systems are trying to get RPM & Torque wanted/needed while keeping power used low.

author: tatus1969
author_rank: Super Contributor
timestamp: July 30, 2016, 11:10:21 pm
content: Quote from: nForce on July 30, 2016, 03:28:47 pmCorrect. Having exactly 90 degrees of phase between the two flux vectors is called MPTA control (max torque per ampere). In this case, the one PI regulator (q loop) receives the desired torque, and the other controller (p loop) has a zero set point.Of course this is only valid for low rpm. The faster the motor spins, the more back emf it generates and the more voltage the inverter has to develop. At a certain point the inverter is at maximum amplitude, reaching the DC bus voltage limits. When going even further, the commanded current (flux, torque) cannot be delivered anymore and the controllers saturate. This is comparable to a brushed DC motor that you directly connect to a supply. When you now start reducing the motor load then you graduylly approach the motor's no-load speed.Quote from: nForce on July 30, 2016, 03:28:47 pm{d,q} are components of an orthogonal vector, I explained that in my first post. Look at linear algebra theory for that. A vector has an amplitude and an angle. For example, {d,q} = {0,100} has an amplitude of 100 and an angle of 90 degrees. By convention, this is the desired angle for MPTA. Note that {measured d, measured q} and {d loop, q loop} represent currents, and {d command, q command} is a voltage vector.By adding a nonzero "p" component you effectively change the angle of that vector, and by this also the angle of the two magnetic fluxes, away from the 90 degrees. Depending on which angle you choose at which motor condition, you get maximum power efficiency, maximum speed, or maximum torque.

author: tatus1969
author_rank: Super Contributor
timestamp: July 30, 2016, 11:14:32 pm
content: Quote from: C on July 30, 2016, 08:07:02 pmCurrently we are discussing the FOC principle, this does not apply to induction motors at all. FOC is only for permanent magnet synchronous motors (https://en.wikipedia.org/wiki/Synchronous_motor#Permanent_magnet_motors).

author: langwadt
author_rank: Super Contributor
timestamp: July 31, 2016, 02:01:55 am
content: Quote from: tatus1969 on July 30, 2016, 11:14:32 pmFOC can also be used on induction motors

author: tatus1969
author_rank: Super Contributor
timestamp: July 31, 2016, 09:31:19 am
content: Quote from: langwadt on July 31, 2016, 02:01:55 amThanks, learned something new. This was apparently an assumption that I didn't verify. Here's my ideas that led me to my mistake, am i right with them? -->- main idea of FOC is to control motor torque, with the advantage that this presents the overlying velocity controller a linear control problem, which in turn yields good dynamic behavior.- in a PMSM, torque is proportional to stator current at right phase to rotor, so all you have to do is measure it and add a control scheme for inverter voltage amplitude and phase.- in an AC motor, this is not the case, because the rotor flux is a function of the stator current's amplitude and frequency. When you measure the stator current, you know nothing yet about torque. That would require an electromagnetical motor model which could estimate rotor current/flux. Nobody seems to be doing that.- therefore, the "torque controller" in this picture does not control torque, only stator current- as a consequence, the velocity controller sees a highly nonlinear controlled system. This is not what we initially wanted, and regulation will be poor.- because we cannot actuallymeasurethe rotor flux angle as we can do with a PMSM, we always need a prediction scheme that is highly motor dependent, leading to problems at standstill or direction reversal.I only used FOC for high-dynamic servo applications, and with PMSM it is very impressive. I played music on a 20kW motor with quite some rotor inertia, and you couldn't even hear the transitions between the tones. Needed a stiff chassis for that test though

author: nForce
author_rank: Frequent Contributor
timestamp: August 01, 2016, 05:26:13 pm
content: What is "Space vector PWM"?Is this reffering to the algorithm SVM which generates PWM? Are there any other modulation algorithms?On wikipedia I just found modulation for information encoding, which I am not looking for.

author: tatus1969
author_rank: Super Contributor
timestamp: August 01, 2016, 07:37:11 pm
content: Quote from: nForce on August 01, 2016, 05:26:13 pmCouldn't find a direct Wikipedia article either. The term is SVPWM or Space Vector PWM, where did you read SVM?Just look in one of the links in my posthttps://www.eevblog.com/forum/chat/regulating-speedtorque-of-induction-motor-methods/msg993461/#msg993461,they are describing in detail what this is about.The basic idea is that the orthogonal {alpha command, beta command} voltage vector needs to be transformed to a three-phase voltage command for the inverter, with 120° phase separation. The most straightforward wat is to calculate magnitude and phase of {alpha command, beta command}, and to calculate { mag * cos( phi ), mag * cos( phi + 120° ), mag * cos( phi + 240° ) }. From that you can calculate the three PWM values of the inverter.SVPWM does basically the same task in a different way, but they add a nice trick that extends the maximum phase-to-phase voltage of the inverter. It is in these documents.

author: nForce
author_rank: Frequent Contributor
timestamp: August 01, 2016, 08:10:26 pm
content: I meant this:https://en.wikipedia.org/wiki/Space_vector_modulation.Is this where the term "space vector" comes from?

author: tatus1969
author_rank: Super Contributor
timestamp: August 02, 2016, 07:56:28 am
content: Quote from: nForce on August 01, 2016, 08:10:26 pmYes, that is the overlying theory. I hadn't gone deeply into this in the past, in software it is nothing more than some sin/cos calculations and if/else statements. I read that Wikipedia article several times, I would say that SVPWM is a specialization of SVM. Found this one on the way:http://www.slideshare.net/biswajitcet13/svpwm

author: nForce
author_rank: Frequent Contributor
timestamp: August 02, 2016, 09:13:06 pm
content: Ok, thanks I get it now.Let's go to the DTC:Can someone explain a litle more about this. I can't find any explanation of this on the internet only wikipedia. Which hasn't got the block diagram.

author: Andy Watson
author_rank: Super Contributor
timestamp: August 02, 2016, 09:45:55 pm
content: Quote from: nForce on July 28, 2016, 06:26:52 pmI believe this diagram originates from a TI application note - BPRA073http://www.ti.com/lit/an/bpra073/bpra073.pdfIgnore the references to the TMS320 the rest of the note provides a good explanation of the basics.

author: tatus1969
author_rank: Super Contributor
timestamp: August 03, 2016, 11:53:00 am
content: Quote from: nForce on August 02, 2016, 09:13:06 pmThe Wiki article explains the principle on a higher level, the block diagram there shows the same as yours on a higher abstraction level.I'll give it a try:DTC and FOC share some things in common, and I have seen DTC being used for PMSM as well. The used hardware is the same: 3-phase inverter and phase current measurements. For the torque/flux estimator of DTC, you need the phase voltages as well, and the bus voltage. the (a,b,c -> alpha,beta) block does again the transformation from three-phase vectors to orthogonal vectors (Clarke transformation), this time with both the voltage and the current vectors. The bus voltage measurement is used to calculate the absolute voltage value from the inverter's current transistor switch states.The T/F estimator uses an electromagnetical model of the motor, typically an AC induction motor. It estimates the {torque, flux} vector, as we want to control these and there is no direct way to measure them (as opposed for the PMSM). Still pretty much the same as in FOC.The big difference is that DTC does not run the inverter in a PWM scheme at a fixed frequency with varying duty cycle, but they have a hysteretic approach here. If the torque or flux level goes above the commanded value, plus a certain margin, they switch the inverter into "neutral" (all high-sides ON, or all low-sides ON). Once the level has dropped below the setpoint, minus a margin, they switch it on again. As the inverter has six different switch possibilites (six "sectors"), they need to decide which to take. That decision is made in the "flux sector" block. It takes the estimated rotor flux vector {phi alpha, phi beta} as input, and decides on that which voltage sector to use best. The resulting output looks like this when plotted over time:The Wiki article nicely lists the dis/-advantages of this hysteretic approach.

author: jeroen74
author_rank: Frequent Contributor
timestamp: August 03, 2016, 12:10:18 pm
content: I found thisvideo by TI quite helpful in understanding FOC. That guy also has a blog series on how to tune the regulators:https://e2e.ti.com/blogs_/b/motordrivecontrol/archive/2015/07/20/teaching-your-pi-controller-to-behave-part-i

author: tatus1969
author_rank: Super Contributor
timestamp: August 03, 2016, 04:56:01 pm
content: Quote from: jeroen74 on August 03, 2016, 12:10:18 pmVERY nice video :-) Just one remark: he completely forgot to explain Sate Vector PWM, even though it is on one of his slides O0

author: nForce
author_rank: Frequent Contributor
timestamp: August 03, 2016, 06:15:49 pm
content: Is this T/F block, actually a mathematical model of a motor? Why do we need then the flux and torque reference? Because we measure the values (voltage, current) we compare them with the model, so we can compute the signals for the inverter voltage vector table.And this vector table, is really similar to the SVM algorithm.

author: tatus1969
author_rank: Super Contributor
timestamp: August 03, 2016, 09:18:38 pm
content: Quote from: nForce on August 03, 2016, 06:15:49 pmYes it is. Problem is: when you measure voltage and current of the motor terminals, then you know what is happening in the stator. But as we are dealing with an AC induction motor, you know nothing about what is happening in the rotor's squirrel cage. You know neither magnitude nor direction of the induced current, and that is what is creating rotor flux. So you need a model that predicts this information, based on what is known (stator voltage and current).Quote from: nForce on August 03, 2016, 06:15:49 pmSimilar to the fact that we have a three-phase inverter, and that has six "active" states, and two states with zero voltage (all high or all low side switches conducting). The idea how to control them is quite different though.