|ORC-43 Buan Hover Car, implemented with tracker-based PD controllers. Link|
This series of articles document how my approximated automation-block PID controller works and how I implement them on self-stabilizing machines.
Trackers and Steering Hinge Syncing
To see the sensor beams in simulation, The Colliderscope mod Must be installed. Other mods from Dagirefaa are also recommended for advanced building.
The stabilization systems I developed is based on trackers and steering hinge/block synchronization. Either a single-sensor version with RTC steering hinge, or a 2-sensor non RTC version will do the job. The same idea can be applied to absolute angle tracking with anglometer blocks.
And again, in my notes I assume the readers have a certain understanding in Besiege building to replicate these just by a glance.
|Tracking the relative height to the ground with 1-sensor or 2-sensor tracker|
To make the tracking useful, I need to utilize the angle of the steering hinge. Since the steering hinges/blocks are perfectly synced when bound to the same keys, I can set up a system that has continuous output instead of "0 and 1".
In the gif above is in fact the P controller. P stands for proportional, although in this case using rotating blocks it's sinusoidal approximated, not perfectly linear. In small angle, sin(x) ~= x (see the figure below).
|Graph of sin(x)|
The I, integral term is very simple. In the image bellow, the I is using the two vertical sensors and the flying block pair on the yellow hinges. When the height is low, it turns the flying block up slowly, otherwise down.
Since currently my machines do not need term I, this is kept simple and will not be further discussed in the series.
|PID height controller. Blues are term P, yellows are term I, and the red is term D|
|PID controller in action. Term I adds up to compensate|
the added drag tool weight. Term D resists the sudden movement
Term D is derivative, i.e. speed in short. Term D resists changes, dampen the system to eliminate oscillation. It uses the same tracker as term P.
When implementing D for a 1-sensor tracker, it needs an automatic (always on) thruster in the return direction of the RTC steering hinge, and another thruster in the opposite direction with double the force and mapped to the sensor's output.
For a 2-sensor tracker, just map the thrusters to the outputs of the two sensors respectively to the directions.
|Active damper, a D controller with 2-anglometer angle tracker and a reaction wheel|
Characteristics of PD Controllers Based On 1-Sensor & 2-Sensor Trackers
Term P and term D have different oscillation characteristics on 1-senor and 2-sensor trackers.
With a 1-sensor tracker, P and D outputs are both oscillating. But an oscillating term P is giving a more precise output while an oscillating term D will make the whole machine oscillate, which is not good visually.
For a 2-sensor tracker, P and D outputs are not oscillating due to the dead zone between two sensors. Now term P is causing the whole machine to oscillate in low frequency, according to the size of the dead zone. And term D is only responding when it goes outside of the dead zone, keeping the machine from oscillating.
Therefore, a 3-sensor system with 1-sensor term P and 2-sensor term D is ideal for the desired smooth control of my hover car.
|ORC-43 Buan Hover Car|
Tuning the PD system
To tune the tracker-based PD system, every parameters on the sensors, steering hinges/blocks, and thrusters have their effects. The sensor setup can affect the dead zone; the tracker steering hinge speed affects the response time and also the strength of term D; the thruster is the output force, obviously.
One note about systems involving anglometers is that the presence of gimbal lock. If the machine does not have something that can detect a gimbal lock,when it goes upside-down the system will see a sudden 360° change in direction/attitude, which will very likely causing the machine to fail.