Memuat
Memuat
Watch every step above performed live, with English narration.
0 plays
Class book
Page 1 / 6
Cover: Class Sliding Mode Control Quadrotor #4: SMC for Attitude & Position Quadrotor, Overcoming Chattering
Click a page or use ◀ ▶ to turn · swipe on mobile · to enlarge
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 #4: SMC for Attitude & Position Quadrotor, Overcoming Chattering”.
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.
Here is the final result, the quadrotor tracks a helix path while facing wind. Sliding mode control with baun from layer 3 times more accurate than PID, and chatter is 20 times smaller than regular SMC. Let's start. Welcome to episode four of the quadrotor control series with sliding mode control. In the previous episode, we understood SMC on a simple system. Today, we apply it to the six channels of the quadrotor, three positions and three angles, and test it against wind.
We add the saturation function and the SMC control class to the control .py file. Each channel is treated as a second-order system with the sliding surface S equal to the derivative of the error plus lambda times the error. And the control acceleration reference plus lambda times the derivative of the error plus KA times the saturation of S. Lambda and KA are selected per channel, angle channels are faster and have higher gain than position channels. The observer part in this class will be discussed in the next episode, for now the observer is not active.
Create the file smc-quadrotor.py The reference is a helix, a circle with a radius of 1 meter and a period of 10 seconds while slowly ascending. The wind is a constant gust of 2 N starting at the fifth second, plus oscillating wind of 1 N. The value function calculates RMSI position, maximum error, and cetering size, which is the average change in roll moment per step.
We compare PID, SMC with pure sign, and SMC with baun from layer. Run. PID has an RMSI of 0.243 meters with a maximum error almost 40 cm. SMC sign is more accurate, 0.135 meters, but its cetering moment is 0.31 Nm per step, very bad for the motors. SMC baun from layer is the best. RMSI 0.079 meters, 3 times more accurate than PID, and cetering only 0.015, 20 times smoother than SMC sign. Let's see the graphs.
The PI error spikes dramatically when the wind comes at the fifth second, while both SMCs remain small. A 1-second zoom on the roll moment shows the SMC sign vibrating very fast, while the SMC baun from layer is smooth. The SMC error is not zero because the baun from layer leaves a little error when the disturbance is still present. In the next episode, we remove it using an observer.
Done. We have already implemented sliding mode control on the 6 channels of the quadrotor, tracking a helix path with wind, and compared PID, SMC sign, and SMC baun signals from the layer. In the next episode, we create a disturbance observer to estimate the wind. Currently working on a thesis, dissertation, or research in the field of control systems, drones, and UAVs. Cerdas Inovasi Digital helps with control system implementation, 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 path testing with wind? All 6 episodes, complete with PDF step-by-step guides and source code, are available to premium tutorial subscribers. Subscribe starting at Rp69.000 per month, save 28% with the 12-month package, or pay once Rp999.000 for lifetime access. Want just one class? Buy the single class with lifetime access. Subscribe now at the premium page cerdasinovasidigital.com Contact us via WhatsApp, or visit cerdasinovasidigital.com Thank you for watching, see you in the next episode. Thank you for watching!
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 →