Memuat
Memuat
Want to go deeper?
Join one of our courses or ask us directly on WhatsApp.
Picked from the software, topic, and level of “Class Sliding Mode Control Quadrotor #5: Disturbance Observer for Wind & Disturbance Estimation”.
Other ways we can help with Python.
Learn with a mentor
Scheduled Simulation & Engineering courses with live guidance and a certificate.

Course/Training Ansys ~ Heat Transfer and Heat Flux Analysis
★ 5.0 (10)

Course/Training MATLAB — MATLAB App Design: The Ultimate Guide to MATLAB Apps
★ 5.0 (10)

Course/Training Ansys — Airflow Simulation of a Car Radiator with ANSYS
★ 5.0 (9)
Have it built for you
No time to learn Python? Our team can do the project for you.

Matlab Development Service — Complete Neural Signal Processing and Analysis Zero to Hero
★ 5.0 (59)

Ansys Maxwell Development Service
★ 5.0 (50)

Petrel Development Service
★ 5.0 (14)
Get notified about new Python classes
At most one email a week. Unfollow anytime with one click.
The full narration of this video. The current sentence is highlighted while the video plays; click any sentence to jump there.
This is the final result, the disturbance observer accurately estimates a wind force of 2N without a wind sensor, only from the quadrotor's own motion. Combined with SMC, tracking error drops 6 times and chattering almost disappears. Let's start. Hello, welcome to episode five of the quadrotor control series with sliding mode control. SMC is robust to disturbances because its switching gain K is larger than the worst disturbance, but a large K means aggressive control. The idea is, if disturbances can be predicted and compensated for directly, K can be small. That is the task of the disturbance observer.
Let's look again at the observer section in the SMC control class in the control.py file. The observer compares the expected acceleration according to the nominal model, from the actual thrust and moment applied, with the real acceleration observed from velocity changes. The difference is the disturbance. The formula uses a helper variable Z, detopi equals Z plus L times velocity, and Z is updated with minus L times the model plus detopi. In this way, we don't need to numerically differentiate velocity, which is prone to noise. The estimated detopi is then subtracted from the control law for each channel.
Create a test file called underscore observer.py. We will run SMC with the observer active and record the estimated disturbance, multiplied by mass to become force in Newtons. Then we will compare standard SMC, SMC with observer, and SMC with observer but small switching gain.
Run. The actual wind force in the X direction is 2 Newtons, and the observer estimates 1.99 Newtons, with an average error of only 0.03 Newtons. With the observer, RMSI drops from 0.079 to 0.052 meters. The best results come when the switching gain is reduced, RMSI is only 0.013 meters, 6 times more accurate than standard SMC, and chattering is 0.0003, 50 times smoother. Disturbances are handled by the observer, so the switching part is quite small.
Let's look at the graphs. Left graph. The dashed line of the observer's estimate sticks closely to the black line of the actual wind, whether it's a constant strong X gust or oscillating Y wind. Right graph, the SMC with observer and small gain error is nearly zero throughout, even after the wind arrives.
Done. We have understood disturbance observer, estimated wind force without sensors, and combined it with SMC so that the error drops 6 times and chattering is almost gone. In the final episode, we tested everything on a 3D trajectory with random wind. Currently working on a thesis, dissertation, or research in the field of control systems, drones, and UAVs. Cerdas Inovasi Digital helps implement control systems, from 6 degrees of freedom quadrotor modeling, hierarchical PI, sliding mode control, up to disturbance observer for wind, as well as offering Python programming courses for electrical and mechatronics engineering. Want to master the entire series, from quadrotor models to 3D trajectory testing with wind? All 6 episodes, complete with PDF step-by-step guides and source code, are available for premium tutorial subscribers. Subscribe starting at Rp69.000 per month, save 28% with the 12-month package, or one-time payment of Rp999.000 for lifetime access. Want just one class? Buy a single class with lifetime access. Subscribe now at the premium page cerdasinovasidigital.com Contact our WhatsApp or visit cerdasinovasidigital.com Thank you for watching, see you in the next episode. Thank you for watching, see you in the next episode.
Type a question or keyword; we find the part of this episode that explains it and jump the video there.
Notes are saved with the current video time and are only visible to you.
Stuck on a step? Ask here; the instructor and other learners can answer.
No questions yet.

Cerdas Inovasi Digital Team
Software developers, BIM & 3D engineers, and AI practitioners
We build software, BIM models, games and AI automations for clients every day, and turn that hands-on work into step-by-step classes: every step is shown on screen and comes with a PDF guide you can keep.
See our clients →