
Electronic Basics #34: Two-Position Controller & PID Controller
video description
Date: 2020-09-05
Related videos
Comments and reviews: 9
isettech
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
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
InFAMOUSPS4
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
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
Jeffery
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
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
Maggus
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
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
Smd
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
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
Carlos
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
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
prabhav
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
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
RAVELONJATOVO
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
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
Kecoa
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
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















