VehiclesFashionRecipesBlogsHuntTravelsSportFunHandmadeITEducation
Mini-Games
x

x
zakruti.com » Knowledge, science, education » GreatScott!
Electronic Basics #34: Two-Position Controller & PID Controller

Electronic Basics #34: Two-Position Controller & PID Controller

FBTwitterReddit

video description

Rating: 4.0; Vote: 1
Electronic Basics #34: Two-Position Controller & PID Controller Nicholas: In high performance applications, the way magnetic levitation is performed is by using two control loops. You have an inner control loop using typically a PI controller that regulates current (you need current sensors) into your RL load (electromagnet. You then have a an outter control loop that regulates position typically using a PID controller with a low pass filter on the derivative term. Your sensor reads in position which goes through your PID controller. the output of this motion controller is a force command. This force command is then inverted into the corresponding current needed to produce that force. This current command is then fed into your inner loop controller which regulates your current to the desired value. The desired current flows and produces the force commanded by your PID position controller and the overall loop is closed. Tuning the current regulator is pretty simple. using pole-zero cancellation, you set kp = L w_b and ki = R w_b where R and L are the resistance and inductance of your electromagnet respectively and w_b is the desired bandwidth of your current controller in rad/s. Tuning the position controller is a little more involved as you must move your unstable RHP pole into the LHP. Although tuning can be done manually, it is very difficult as you're trying to make an inherently unstable system stable. Frequency domain methods usually work really well for tuning it. Cheers!
Date: 2020-09-05

Comments and reviews: 9


Before digital became common, this was all analog. The whole thing is built on a quad op amp. 3 of the amps are PID portions and the 4th sums the currents. Each portion had more control. For example the P factor has gain and offset so the linear portion is balanced with high gain with an offset to target the setpoint. The integrator and diritive has gain as well as tuning for the time constants. The time constants are selected to be complimentary to the mechanical moment of inertia for critical damping. The analog systems when properly tuned perform very well without the lag of A/D and calculation cycles on a processor. This is important when the moment of inertia is low such as the single magnet in the video. Many of these systems are linear for a low noise figure in the system without PWM.
Would you like to try to make a video of the analog version of this? I would recommend the Active Filter Cookbook by Don Lancaster for reference in design of the low and high pass filters for the time constants.

reply

I might have this wrong but that long ferromagnetic rod might have a higher moment of inertia than your other magnet configuration types thus it doesnt want to oscillate as much. The magnetic field lines are also different (this case the poles have a smaller area) thus giving the circuit a more precise signal on the Hall effect sensor an easier job to do
reply

What also could help is using a high voltage zenerdiode as flyback diode for the electromagnet. Higher voltage = faster discharge of the electromagnet. If you have a slow discharge the magnetic field will also slowly decrease when the elktromagnet is supposed to be off. Might make it more stable; )
reply

ah here it is the PID.
Well, I would guess you should decrease the overall sampling time.
Using the Arduino libraries makes the samplig time slow.
The faster it is, the better the control loop.
Don't forget the anti windup to use,
and not too much of the P - parameter: -)

reply

You just need more electromagnets to create a magnet free core. The core's diameter should be larger than the to be levitated magnet. And use a h-bridge to create an alternating field. Like this: as the magnet flips you should also flip the polarity of the electromagnet. It should work.
reply

the problem of this sytem is that it's not a linear system, but a non-linear one, what means you can't use linear control techniques to control it. Also PID linear tuning method like ziegler-nichols won't work with a non-linear system (a PWM control, for instance.
reply

Why don't you add another hall effect sensor at the bottom and whenever the magnet comes near the bottom hall effect sensor it activates the external interrupt of the arduino to activate the electromagnet to pull the magnet towards itself.
reply

i think that sensor is exposed to two variable magnetic fields and the results can be wrong, it is no easy to stabilise the system, so you should put something between sensor and electromagnet, thanks for your effort
reply

hah, here you are, I saw your another video before this one. i read also the comments with pid controller, but for magnetic levitation, it's better to use z-transform, or n-order discrete controller.
reply
Add a review, comment






Other channel videos