Cours connexes :
- Temps Reel - S8 - Implementation temps reel des lois de commande
- Systemes Multivariables - S7 - Commande de systemes MIMO
Commande Numerique
PARTIE A : GENERALITES
Presentation
Le cours "Commande Numerique" traite de la conception et de l'implementation de lois de commande sur calculateur numerique. Avec la generalisation des microcontroleurs et processeurs, la commande numerique est devenue la norme dans l'industrie. Ce cours couvre la theorie de l'echantillonnage, la synthese de correcteurs numeriques, et leur implementation pratique.
Annee Academique : 2023-2024
Semestre : 8
Categorie : Automatique / Commande
PARTIE B : PARTIE DESCRIPTIVE
Details de l'experience
Environnement et contexte
Le cours combinait developpements mathematiques (transformee en Z, equations aux differences) avec implementation sur microcontroleur et simulation Matlab/Simulink. Nous avons concu des regulateurs numeriques pour differents systemes (moteur, temperature, niveau) et les avons testes en laboratoire.
Ma fonction
Dans ce cours, j'ai ete responsable de :
- Comprendre la theorie de l'echantillonnage et ses effets
- Modeliser des systemes continus en temps discret
- Synthetiser des correcteurs numeriques (PID, RST, predictif)
- Choisir la periode d'echantillonnage appropriee
- Implementer des lois de commande sur microcontroleur
- Gerer les aspects pratiques (quantification, saturation, anti-windup)
- Valider les performances en simulation et experimentation
PARTIE C : PARTIE TECHNIQUE
Cette section explore les aspects techniques de la commande numerique.
Concepts techniques appris
1. Echantillonnage et Theoreme de Shannon
Principe :
Conversion d'un signal continu s(t) en signal echantillonne s[k] :
s[k] = s(k*Te)
ou Te est la periode d'echantillonnage
Fe = 1/Te est la frequence d'echantillonnage
Theoreme de Shannon :
Fe >= 2*Fmax
Pour eviter le repliement spectral (aliasing).
En pratique :
Fe >= (6 a 40) x BW_systeme
ou BW_systeme est la bande passante du systeme.
Choix de Te :
- Trop grande : perte d'information, instabilite
- Trop petite : charge calcul, cout, problemes numeriques
- Compromis selon application
2. Bloqueur d'Ordre Zero (BOZ / ZOH)
Fonction :
Maintenir la valeur de sortie constante entre deux echantillons :
u(t) = u[k] pour k*Te <= t < (k+1)*Te
Fonction de transfert :
G_BOZ(s) = (1 - e^(-Te*s)) / s
Effet frequentiel :
Attenuation haute frequence (similaire a filtre passe-bas).
Retard equivalent :
Environ Te/2 (retard moyen introduit)
3. Transformee en Z
Definition :
Z{s[k]} = S(z) = Sum s[k]*z^(-k) pour k=0 a infini
ou z = e^(Te*s) relie plan de Laplace au plan en Z
Figure : Schema bloc d'un systeme de commande numerique avec correcteur C(z) Figure: Block diagram of a digital control system with controller C(z)
Proprietes :
- Linearite : Z{a*x[k] + b*y[k]} = a*X(z) + b*Y(z)
- Retard : Z{x[k-n]} = z^(-n)*X(z)
- Avance : Z{x[k+n]} = z^n*(X(z) - Sum x[k]*z^(-k))
- Valeur initiale : x[0] = lim(z->infini) X(z)
- Valeur finale : x[infini] = lim(z->1) (z-1)*X(z) (si stable)
Transformees usuelles :
- Echelon : Z{1[k]} = z/(z-1)
- Rampe : Z{k} = Te*z/(z-1)^2
- Exponentielle : Z{e^(a*k*Te)} = z/(z-e^(a*Te))
- Sinusoide : Z{sin(w*k*Te)} = z*sin(w*Te)/(z^2-2z*cos(w*Te)+1)
4. Fonction de Transfert en Z
Definition :
H(z) = Y(z)/U(z) = (b0 + b1*z^(-1) + ... + bm*z^(-m)) / (1 + a1*z^(-1) + ... + an*z^(-n))
Equation aux differences :
y[k] = -a1*y[k-1] - ... - an*y[k-n] + b0*u[k] + b1*u[k-1] + ... + bm*u[k-m]
Forme directement implementable sur calculateur.
Passage continu -> discret :
Methode d'Euler avant :
s -> (z-1)/Te
Methode d'Euler arriere (backward) :
s -> (z-1)/(Te*z)
Methode de Tustin (trapezoidale) :
s -> (2/Te)*(z-1)/(z+1)
Plus precise, preserve mieux stabilite.
Methode de la reponse impulsionnelle invariante
Methode ZOH (blocage d'ordre zero) :
H(z) = Z{L^(-1){G(s)/s * (1 - e^(-Te*s))}}
Methode exacte pour systeme precede d'un BOZ.
5. Stabilite des Systemes Discrets
Condition de stabilite :
Tous les poles dans le cercle unite du plan en Z :
|z_i| < 1 pour tout pole z_i
Relation avec plan de Laplace :
- Demi-plan gauche (stable continu) -> Interieur cercle unite (stable discret)
- Axe imaginaire -> Cercle unite
- Demi-plan droit (instable) -> Exterieur cercle unite
Critere de Jury :
Table de Routh equivalente pour temps discret. Verifie si polynome a racines dans cercle unite.
Lieu d'Evans discret :
Similaire au continu mais interpretation differente (cercle unite).
6. Analyse Frequentielle Discrete
Reponse frequentielle :
H(e^(jw*Te)) = H(z)|_(z=e^(jw*Te))
Periodique de periode Fe (repliement).
Diagrammes de Bode discrets :
- Gain : |H(e^(jw*Te))|_(dB)
- Phase : arg(H(e^(jw*Te)))
Traces pour w dans [0, pi/Te] (jusqu'a Fe/2).
Marges de stabilite :
- Marge de gain
- Marge de phase
Interpretation similaire au continu.
7. Regulateur PID Numerique
Forme continue :
C(s) = Kp + Ki/s + Kd*s
Discretisation :
Forme vitesse (incrementale) :
Du[k] = u[k] - u[k-1]
Du[k] = q0*e[k] + q1*e[k-1] + q2*e[k-2]
Ou :
- q0 = Kp + Ki*Te + Kd/Te
- q1 = -Kp - 2*Kd/Te
- q2 = Kd/Te
Forme position :
u[k] = Kp*e[k] + Ki*Te*Sum(e[k]) + Kd*(e[k]-e[k-1])/Te
Action proportionnelle :
uP[k] = Kp*e[k]
Action integrale (methode rectangulaire) :
uI[k] = uI[k-1] + Ki*Te*e[k]
Action derivee :
uD[k] = Kd*(e[k] - e[k-1])/Te
Souvent filtree pour reduire bruit :
uD[k] = alpha*uD[k-1] + Kd*(1-alpha)*(e[k]-e[k-1])/Te
8. Correcteurs Polynomiaux RST
Structure :
R(z)*U(z) = T(z)*Yref(z) - S(z)*Y(z)
Ou :
- R, S, T sont des polynomes en z^(-1)
- Offre plus de degres de liberte que PID
Equation de commande :
u[k] = (1/r0)*[t0*yref[k] + ... - s0*y[k] - s1*y[k-1] - ... - r1*u[k-1] - ...]
Synthese par placement de poles :
Resolution de l'equation diophantienne :
A*R + B*S = P_desire
Ou P_desire contient les poles en boucle fermee souhaites.
Avantages :
- Placement precis des poles
- Gestion des zeros du systeme
- Robustesse ajustable
9. Commande Predictive (MPC)
Principe :
Optimiser une sequence de commandes futures pour minimiser un critere.
Critere :
J = Sum [w_y*(yref[k+i] - y[k+i])^2 + w_u*Du[k+i]^2]
Sur un horizon de prediction.
Algorithme :
- Predire sortie future avec modele
- Optimiser commande pour minimiser J
- Appliquer premiere commande u[k]
- Repeter a chaque instant (receding horizon)
Avantages :
- Gestion naturelle des contraintes (saturation)
- Anticipation (action predictive)
- MIMO naturellement
Inconvenients :
- Charge calcul elevee
- Necessite modele precis
10. Aspects Pratiques d'Implementation
Quantification :
- ADC : signal analogique -> valeur numerique
- Calculs : virgule fixe ou flottante
- DAC : valeur numerique -> signal analogique
Erreurs de quantification peuvent causer :
- Cycles limites (oscillations)
- Degradation de performance
Saturations :
Actionneurs ont limites physiques :
u_min <= u[k] <= u_max
Anti-windup :
Quand u sature, l'integrateur continue a s'accumuler (windup).
Solution :
Si u sature:
uI[k] = uI[k-1] (geler integrale)
ou
uI[k] = u_sat - uP[k] - uD[k] (back-calculation)
Filtre derive :
L'action derivee amplifie le bruit. Filtrer avec passe-bas :
D_filtre(z) = Kd*z/(z + alpha) avec 0 < alpha < 1
Bumpless transfer :
Lors de changement de mode (manuel -> auto), eviter saut brutal :
- Initialiser correctement l'integrateur
- Transition douce
Temps d'execution :
Le code de commande doit s'executer en moins de Te :
T_exec < Te
Sinon, instabilite ou perte d'echantillons.
Optimisations :
- Code efficace (eviter fonctions couteuses)
- Utiliser virgule fixe si necessaire
- Interruptions pour timing precis
11. Observateurs Discrets
Problematique :
Si toutes les variables d'etat ne sont pas mesurees, les estimer.
Observateur de Luenberger discret :
x_hat[k+1] = A*x_hat[k] + B*u[k] + L*(y[k] - y_hat[k])
y_hat[k] = C*x_hat[k]
Placement des poles de l'observateur :
Plus rapides que ceux du systeme (2-5 fois).
Filtre de Kalman :
Observateur optimal en presence de bruit.
12. Outils de Simulation et Test
Matlab/Simulink :
- Blocs temps discret
- Modelisation systeme mixte (continu + discret)
- Discretisation automatique (c2d)
- Analyse performance
Processor-in-the-Loop (PIL) :
Simulation avec code reel sur processeur cible. Verifie comportement avec quantification, timing reel.
Hardware-in-the-Loop (HIL) :
Controleur reel + systeme simule temps reel. Validation avant tests sur systeme physique.
Banc d'essai :
Test sur systeme reel avec instrumentation. Validation finale.
PARTIE D : PARTIE ANALYTIQUE
Connaissances et competences mobilisees
- Theorie de l'echantillonnage et transformee en Z
- Discretisation de systemes continus
- Analyse de stabilite des systemes discrets
- Synthese de correcteurs numeriques (PID, RST, MPC)
- Programmation de lois de commande sur microcontroleur
- Gestion des aspects pratiques (quantification, saturation, timing)
- Utilisation de Matlab/Simulink pour conception et simulation
- Validation experimentale sur systemes reels
- Optimisation de code pour temps reel
Auto-evaluation
Ce cours a ete crucial pour comprendre que la commande numerique n'est pas qu'une simple discretisation de la commande continue. L'echantillonnage introduit des phenomenes specifiques (repliement, retard) qui doivent etre pris en compte.
La transformee en Z, initialement abstraite, est devenue un outil naturel apres pratique. La correspondance plan s <-> plan z est fondamentale pour comprendre comment les proprietes continues se transposent en discret.
Le choix de la periode d'echantillonnage est un compromis delicat. J'ai appris qu'il ne suffit pas de respecter Shannon; il faut echantillonner suffisamment vite pour que le comportement discret soit proche du continu, mais pas trop pour eviter problemes numeriques et charge calcul.
Le PID numerique semble simple mais les details d'implementation (forme vitesse vs position, anti-windup, filtre derive) sont essentiels pour performance et robustesse. Les problemes de windup peuvent causer des comportements tres surprenants.
Les correcteurs RST offrent beaucoup plus de flexibilite que le PID. La synthese par placement de poles est elegante mathematiquement, mais le choix des poles desires reste un art (compromis performance/robustesse).
La commande predictive (MPC) est seduisante pour sa capacite a gerer contraintes et anticipation. Cependant, la charge calcul peut etre prohibitive pour systemes rapides ou microcontroleurs limites. C'est un domaine de recherche actif.
L'implementation sur microcontroleur m'a confronte a des problemes pratiques souvent ignores en cours theoriques : timing d'interruptions, virgule fixe vs flottante, gestion des depassements arithmetiques. Le code doit etre robuste et efficace.
Les simulations Processor-in-the-Loop ont revele des ecarts entre theorie et pratique : quantification, arrondis, delais de calcul peuvent degrader performance voire destabiliser.
Mon avis
Ce cours est indispensable a l'ere du numerique. Pratiquement toute commande moderne est implementee sur calculateur. Maitriser les specificites du discret est donc essentiel.
Points forts :
- Equilibre theorie mathematique / implementation pratique
- Outils modernes (Matlab, microcontroleurs)
- Projets hands-on avec systemes reels
- Prise en compte des contraintes pratiques
Points a ameliorer :
- Plus de temps sur commande predictive (MPC)
- Aspects multi-taches et systemes d'exploitation temps reel
- Commande adaptative et robuste
- Certification (normes industrielles)
Reflexions personnelles :
La commande numerique a revolutionne l'automatique. Ce qui etait impensable en analogique (MPC, observateurs complexes, adaptation) devient possible avec des microcontroleurs peu couteux.
Cependant, la puissance de calcul disponible peut donner une fausse impression de facilite. Un correcteur mal concu (instabilite numerique, parametres inadaptes) ne marchera pas mieux sous pretexte qu'il est numerique.
La tendance est a l'augmentation de la puissance de calcul (processeurs multi-coeurs, FPGA, DSP). Cela ouvre des possibilites (fusion multi-capteurs, traitement d'image embarque, IA embarquee) mais necessite expertise en programmation temps reel et optimisation.
La separation traditionnelle entre electronicien et informaticien s'estompe. L'ingenieur moderne doit maitriser hardware (capteurs, actionneurs, electronique) ET software (algorithmes, programmation embarquee, architectures logicielles).
Applications professionnelles :
Ces competences sont applicables dans tous les domaines de l'automatique industrielle :
- Robotique (commande d'articulations)
- Automobile (ESP, ABS, controle moteur)
- Aeronautique (pilote automatique)
- Procedes industriels (regulation temperature, pression, debit)
- Energie (onduleurs, convertisseurs)
- Drones (stabilisation, navigation)
La maitrise de la commande numerique, couplee a des competences en traitement du signal et systemes embarques, est un profil tres recherche en industrie.
L'avenir verra probablement :
- Integration de l'IA dans les boucles de commande
- Commande distribuee et collaborative (systemes multi-agents)
- Auto-tuning et adaptation automatique
- Co-design hardware/software pour optimisation globale
Avoir des bases solides en commande numerique classique est le prerequis pour comprendre et contribuer a ces evolutions futures.
Documents de Cours
Polycopie Commande Numerique Digital Control Course Notes
Cours complet : transformee en Z, echantillonnage, synthese de correcteurs numeriques et implementation discrete. Complete course: Z-transform, sampling, digital controller synthesis and discrete implementation.
Annales 2019 2019 Past Exam
Sujet d'examen 2019 avec exercices sur transformee en Z, stabilite et synthese de correcteurs PID numeriques. 2019 exam paper with exercises on Z-transform, stability and digital PID controller synthesis.
Correction 2019 2019 Exam Solutions
Correction detaillee de l'examen 2019 avec methodes de resolution et explications completes. Detailed solutions for the 2019 exam with solving methods and complete explanations.
Cours suivi en 2023-2024 a l'INSA Toulouse, Departement Genie Electrique et Informatique.
Related courses:
- Real-Time Systems - S8 - Real-time implementation of control laws
- Multivariable Systems - S7 - MIMO system control
Digital Control
PART A: GENERALITIES
Presentation
The "Commande Numerique" course covers the design and implementation of control laws on digital computers. With the widespread use of microcontrollers and processors, digital control has become the standard in industry. This course covers sampling theory, digital controller synthesis, and their practical implementation.
Academic Year: 2023-2024
Semester: 8
Category: Control Engineering
PART B: DESCRIPTIVE PART
Experience Details
Environment and Context
The course combined mathematical developments (Z-transform, difference equations) with microcontroller implementation and Matlab/Simulink simulation. We designed digital controllers for various systems (motor, temperature, level) and tested them in the laboratory.
My Function
In this course, I was responsible for:
- Understanding sampling theory and its effects
- Modeling continuous systems in discrete time
- Synthesizing digital controllers (PID, RST, predictive)
- Choosing the appropriate sampling period
- Implementing control laws on a microcontroller
- Managing practical aspects (quantization, saturation, anti-windup)
- Validating performance through simulation and experimentation
PART C: TECHNICAL PART
This section explores the technical aspects of digital control.
Technical Concepts Learned
1. Sampling and the Shannon Theorem
Principle:
Conversion of a continuous signal s(t) into a sampled signal s[k]:
s[k] = s(k*Te)
where Te is the sampling period
Fe = 1/Te is the sampling frequency
Shannon's Theorem:
Fe >= 2*Fmax
To avoid spectral aliasing.
In practice:
Fe >= (6 to 40) x BW_system
where BW_system is the system bandwidth.
Choosing Te:
- Too large: loss of information, instability
- Too small: computational load, cost, numerical issues
- Trade-off depending on the application
2. Zero-Order Hold (ZOH)
Function:
Hold the output value constant between two samples:
u(t) = u[k] for k*Te <= t < (k+1)*Te
Transfer function:
G_ZOH(s) = (1 - e^(-Te*s)) / s
Frequency effect:
High-frequency attenuation (similar to a low-pass filter).
Equivalent delay:
Approximately Te/2 (average delay introduced)
3. The Z-Transform
Definition:
Z{s[k]} = S(z) = Sum s[k]*z^(-k) for k=0 to infinity
where z = e^(Te*s) relates the Laplace plane to the Z plane
Figure : Schema bloc d'un systeme de commande numerique avec correcteur C(z) Figure: Block diagram of a digital control system with controller C(z)
Properties:
- Linearity: Z{a*x[k] + b*y[k]} = a*X(z) + b*Y(z)
- Delay: Z{x[k-n]} = z^(-n)*X(z)
- Advance: Z{x[k+n]} = z^n*(X(z) - Sum x[k]*z^(-k))
- Initial value: x[0] = lim(z->infinity) X(z)
- Final value: x[infinity] = lim(z->1) (z-1)*X(z) (if stable)
Common transforms:
- Step: Z{1[k]} = z/(z-1)
- Ramp: Z{k} = Te*z/(z-1)^2
- Exponential: Z{e^(a*k*Te)} = z/(z-e^(a*Te))
- Sinusoid: Z{sin(w*k*Te)} = z*sin(w*Te)/(z^2-2z*cos(w*Te)+1)
4. Z-Domain Transfer Function
Definition:
H(z) = Y(z)/U(z) = (b0 + b1*z^(-1) + ... + bm*z^(-m)) / (1 + a1*z^(-1) + ... + an*z^(-n))
Difference equation:
y[k] = -a1*y[k-1] - ... - an*y[k-n] + b0*u[k] + b1*u[k-1] + ... + bm*u[k-m]
Form directly implementable on a computer.
Continuous-to-discrete conversion:
Forward Euler method:
s -> (z-1)/Te
Backward Euler method:
s -> (z-1)/(Te*z)
Tustin (trapezoidal) method:
s -> (2/Te)*(z-1)/(z+1)
More accurate, better preserves stability.
Impulse invariance method
ZOH (zero-order hold) method:
H(z) = Z{L^(-1){G(s)/s * (1 - e^(-Te*s))}}
Exact method for a system preceded by a ZOH.
5. Stability of Discrete Systems
Stability condition:
All poles inside the unit circle of the Z plane:
|z_i| < 1 for all poles z_i
Relationship with the Laplace plane:
- Left half-plane (continuous stable) -> Inside the unit circle (discrete stable)
- Imaginary axis -> Unit circle
- Right half-plane (unstable) -> Outside the unit circle
Jury criterion:
Discrete-time equivalent of the Routh table. Verifies whether a polynomial has roots inside the unit circle.
Discrete root locus:
Similar to continuous but with different interpretation (unit circle).
6. Discrete Frequency Analysis
Frequency response:
H(e^(jw*Te)) = H(z)|_(z=e^(jw*Te))
Periodic with period Fe (aliasing).
Discrete Bode diagrams:
- Gain: |H(e^(jw*Te))|_(dB)
- Phase: arg(H(e^(jw*Te)))
Plotted for w in [0, pi/Te] (up to Fe/2).
Stability margins:
- Gain margin
- Phase margin
Interpretation similar to the continuous case.
7. Digital PID Controller
Continuous form:
C(s) = Kp + Ki/s + Kd*s
Discretization:
Velocity (incremental) form:
Du[k] = u[k] - u[k-1]
Du[k] = q0*e[k] + q1*e[k-1] + q2*e[k-2]
Where:
- q0 = Kp + Ki*Te + Kd/Te
- q1 = -Kp - 2*Kd/Te
- q2 = Kd/Te
Position form:
u[k] = Kp*e[k] + Ki*Te*Sum(e[k]) + Kd*(e[k]-e[k-1])/Te
Proportional action:
uP[k] = Kp*e[k]
Integral action (rectangular method):
uI[k] = uI[k-1] + Ki*Te*e[k]
Derivative action:
uD[k] = Kd*(e[k] - e[k-1])/Te
Often filtered to reduce noise:
uD[k] = alpha*uD[k-1] + Kd*(1-alpha)*(e[k]-e[k-1])/Te
8. Polynomial RST Controllers
Structure:
R(z)*U(z) = T(z)*Yref(z) - S(z)*Y(z)
Where:
- R, S, T are polynomials in z^(-1)
- Offers more degrees of freedom than PID
Control equation:
u[k] = (1/r0)*[t0*yref[k] + ... - s0*y[k] - s1*y[k-1] - ... - r1*u[k-1] - ...]
Pole placement synthesis:
Solving the Diophantine equation:
A*R + B*S = P_desired
Where P_desired contains the desired closed-loop poles.
Advantages:
- Precise pole placement
- Management of system zeros
- Adjustable robustness
9. Model Predictive Control (MPC)
Principle:
Optimize a sequence of future control actions to minimize a cost function.
Cost function:
J = Sum [w_y*(yref[k+i] - y[k+i])^2 + w_u*Du[k+i]^2]
Over a prediction horizon.
Algorithm:
- Predict future output using the model
- Optimize control to minimize J
- Apply the first control action u[k]
- Repeat at each time step (receding horizon)
Advantages:
- Natural constraint handling (saturation)
- Anticipation (predictive action)
- Naturally handles MIMO systems
Disadvantages:
- High computational load
- Requires an accurate model
10. Practical Implementation Aspects
Quantization:
- ADC: analog signal -> digital value
- Computation: fixed-point or floating-point
- DAC: digital value -> analog signal
Quantization errors can cause:
- Limit cycles (oscillations)
- Performance degradation
Saturation:
Actuators have physical limits:
u_min <= u[k] <= u_max
Anti-windup:
When u saturates, the integrator continues accumulating (windup).
Solution:
If u saturated:
uI[k] = uI[k-1] (freeze integral)
or
uI[k] = u_sat - uP[k] - uD[k] (back-calculation)
Derivative filter:
The derivative action amplifies noise. Filter with a low-pass:
D_filtered(z) = Kd*z/(z + alpha) with 0 < alpha < 1
Bumpless transfer:
When switching modes (manual -> auto), avoid abrupt jumps:
- Correctly initialize the integrator
- Smooth transition
Execution time:
The control code must execute in less than Te:
T_exec < Te
Otherwise, instability or sample loss.
Optimizations:
- Efficient code (avoid expensive functions)
- Use fixed-point arithmetic if necessary
- Interrupts for precise timing
11. Discrete Observers
Problem:
If not all state variables are measured, estimate them.
Discrete Luenberger observer:
x_hat[k+1] = A*x_hat[k] + B*u[k] + L*(y[k] - y_hat[k])
y_hat[k] = C*x_hat[k]
Observer pole placement:
Faster than system poles (2-5 times).
Kalman filter:
Optimal observer in the presence of noise.
12. Simulation and Testing Tools
Matlab/Simulink:
- Discrete-time blocks
- Mixed system modeling (continuous + discrete)
- Automatic discretization (c2d)
- Performance analysis
Processor-in-the-Loop (PIL):
Simulation with real code on the target processor. Verifies behavior with quantization and real timing.
Hardware-in-the-Loop (HIL):
Real controller + real-time simulated system. Validation before testing on the physical system.
Test bench:
Testing on a real system with instrumentation. Final validation.
PART D: ANALYTICAL PART
Knowledge and Skills Mobilized
- Sampling theory and Z-transform
- Discretization of continuous systems
- Stability analysis of discrete systems
- Digital controller synthesis (PID, RST, MPC)
- Programming control laws on a microcontroller
- Managing practical aspects (quantization, saturation, timing)
- Using Matlab/Simulink for design and simulation
- Experimental validation on real systems
- Code optimization for real-time operation
Self Evaluation
This course was crucial for understanding that digital control is not merely a discretization of continuous control. Sampling introduces specific phenomena (aliasing, delay) that must be accounted for.
The Z-transform, initially abstract, became a natural tool after practice. The correspondence between the s-plane and the z-plane is fundamental for understanding how continuous properties translate into discrete ones.
Choosing the sampling period is a delicate trade-off. I learned that simply satisfying Shannon is not enough; one must sample fast enough for the discrete behavior to approximate the continuous one, but not too fast to avoid numerical issues and computational load.
The digital PID seems simple, but implementation details (velocity vs position form, anti-windup, derivative filter) are essential for performance and robustness. Windup issues can cause very surprising behavior.
RST controllers offer much more flexibility than PID. Pole placement synthesis is mathematically elegant, but choosing the desired poles remains an art (performance/robustness trade-off).
Model Predictive Control (MPC) is attractive for its ability to handle constraints and anticipation. However, the computational load can be prohibitive for fast systems or limited microcontrollers. It is an active area of research.
Implementing on a microcontroller confronted me with practical problems often overlooked in theoretical courses: interrupt timing, fixed-point vs floating-point, arithmetic overflow management. The code must be robust and efficient.
Processor-in-the-Loop simulations revealed gaps between theory and practice: quantization, rounding, and computation delays can degrade performance or even destabilize the system.
My Opinion
This course is indispensable in the digital era. Virtually all modern control is implemented on computers. Mastering the specificities of discrete systems is therefore essential.
Strengths:
- Balance between mathematical theory and practical implementation
- Modern tools (Matlab, microcontrollers)
- Hands-on projects with real systems
- Consideration of practical constraints
Areas for improvement:
- More time on Model Predictive Control (MPC)
- Multi-tasking aspects and real-time operating systems
- Adaptive and robust control
- Certification (industrial standards)
Personal reflections:
Digital control has revolutionized control engineering. What was unthinkable in analog (MPC, complex observers, adaptation) becomes possible with inexpensive microcontrollers.
However, the available computing power can give a false impression of ease. A poorly designed controller (numerical instability, inappropriate parameters) will not work better just because it is digital.
The trend is toward increasing computational power (multi-core processors, FPGAs, DSPs). This opens up possibilities (multi-sensor fusion, embedded image processing, embedded AI) but requires expertise in real-time programming and optimization.
The traditional separation between electronics engineer and software engineer is fading. The modern engineer must master hardware (sensors, actuators, electronics) AND software (algorithms, embedded programming, software architectures).
Professional applications:
These skills are applicable across all fields of industrial automation:
- Robotics (joint control)
- Automotive (ESP, ABS, engine control)
- Aerospace (autopilot)
- Industrial processes (temperature, pressure, flow regulation)
- Energy (inverters, converters)
- Drones (stabilization, navigation)
Mastery of digital control, combined with skills in signal processing and embedded systems, is a highly sought-after profile in industry.
The future will likely see:
- Integration of AI in control loops
- Distributed and collaborative control (multi-agent systems)
- Auto-tuning and automatic adaptation
- Hardware/software co-design for global optimization
Having solid foundations in classical digital control is the prerequisite for understanding and contributing to these future developments.
Course Documents
Course taken in 2023-2024 at INSA Toulouse, Department of Electrical and Computer Engineering.