Formal Verification and Co-Simulation in the Design of a Synchronous Motor Control Algorithm
Abstract
:1. Introduction
2. Background on PVS and Co-Simulation
2.1. The PVS Environment
electric_motor_th: THEORY BEGIN Resistance: TYPE = {x: nonneg_real | 1.5 <= x and x <= 3.5} Inductance: TYPE = nnreal Flux: TYPE = nnreal Current: TYPE = nnreal ... electric_motor: TYPE = [# stator_resistance: Resistance, inductance :Inductance, pole_pairs: nat, flux_intensity: Flux #]
acmePN123: electric_motor = (# stator_resistance := 3.1, inductance := 0.5, pole_pairs := 4, flux_intensity := 0.85 #)
power(R: Resistance, i1, i2, i3: Current): real = R*((i1*i1) + (i2*i2) + (i3*i3))
power_positive: THEOREM FORALL (R: Resistance, i1, i2, i3: Current): power(R, i1, i2, i3) >= 0 END electric_motor_th
power_positive : |------- {1} FORALL (R: Resistance, i1, i2, i3: Current): Power(R, i1, i2, i3) >= 0 Rule? (grind) Power rewrites Power(R, i1, i2, i3) to R*i1*i1 + R*i2*i2 + R*i3*i3 Trying repeated Skolemization, instantiation, and~if-lifting, Q.E.D.
2.2. Co-Simulation
3. A Development Process Integrating Verification and Co-Simulation
4. Design of a Controller to Reduce Cogging Torque in Brushless Motors
4.1. Mathematical Model
4.2. Simulation Model
4.3. Logic Model
re_lambda_3(K_22, theta: real): real = Phi_1(theta)/cubicrt(K_22/2 + Phi_2(theta) + sqrt((K_22/2 + Phi_2(theta))^2 - Phi_1(theta)^3)) + cubicrt(K_22/2 + Phi_2(theta) + sqrt((K_22/2 + Phi_2(theta))^2 - Phi_1(theta)^3)) - C_6
a(K_22, theta: real): real = K_22/2 + Phi_2(theta) X(K_22, theta: real): real = cubicrt(a(K_22, theta) + sqrt(sq(a(K_22, theta)) - Phi_1(theta)^3)) re_lambda_3_rew(K_22, theta: real): real = Phi_1(theta)/X(K_22, theta) + X(K_22, theta) - C_6
4.4. Verification
lem_1: LEMMA FORALL (K_22, theta: real): re_lambda_3_rew(K_22, theta) = re_lambda_3(K_22, theta)
quad3: LEMMA FORALL (K_22, theta: real): real_lam3(K_22, theta) <= 0 IFF quadratic(1, -C_6, Phi_1(theta))(X(K_22, theta)) <= 0
lem_3: LEMMA FORALL (K_22, theta: real): re_lambda_3_rew(K_22, theta) <= 0 IMPLIES X(K_22, theta) >= b_1_lam3(theta) AND X(K_22, theta) <= b_2_lam3(theta)where b_1_lam3(theta) and b_2_lam3 are the roots of the quadratic function. From such relationships, conditions on are derived.
5. Co-Simulation and Design-Space Exploration
5.1. Assessment
5.2. Design-Space Exploration
- the absorbed power, :
- the mean square deviation of the tracking error on the angular position,
- the mean square deviation of the tracking error on the current’s direct component
- has been fixed at because this variable has a low impact on the system behavior, as shown in a previous work [3].
- takes the values and in order to study the behavior with two values, one inside and one outside the interval found in Section 4.4.
- the angular position takes the values of 10, 20 and 30 radians.
- The inductance L takes the values , 50, and mH, i.e., the nominal value and small variations.
6. Conclusions
- using the methodology described in the article, one could think of formally analyzing the global state of a mechatronic systems, with a view to safety, mapping the operating states directly with PVS and analyzing the final effects of the unpredictable variations of the parameters via DSE, as well as verify the robustness of the entire dynamic system through co-simulation
- the development of a generalized and more automatic procedure can be used to analyze and verify conditions for the safety of the dynamic system and its users, which is essential in the field of automation and industrial robotics and in the motor vehicle industry, where often the development of a safe and efficient system requires a large number of field tests, which have significant costs
- a systematic development process based on formal methods and co-simulations in the early phases of system design allows reducing risks in the physical prototyping phase.
Author Contributions
Funding
Acknowledgments
Conflicts of Interest
References
- Isermann, R. Mechatronic Systems: Fundamentals; Springer: Berlin, Germany, 2005; pp. 1–624. [Google Scholar] [CrossRef]
- Bernardeschi, C.; Domenici, A.; Saponara, S. Formal Verification in the Loop to Enhance Verification of Safety-Critical Cyber-physical Systems. Electron. Commun. EASST 2019, 77. [Google Scholar] [CrossRef]
- Dini, P.; Saponara, S. Cogging Torque Reduction in Brushless Motors by a Nonlinear Control Technique. Energies 2019, 12, 2224. [Google Scholar] [CrossRef] [Green Version]
- Pelz, G. Mechatronic Systems: Modelling and Simulation with HDLs; Wiley: Hoboken, NJ, USA, 2003. [Google Scholar]
- Gausemeier, J.; Moehringer, S. VDI 2206—A New Guideline for the Design of Mechatronic Systems. IFAC Proc. Vol. 2002, 35, 785–790. [Google Scholar] [CrossRef]
- Entwicklungsmethodik für Mechatronische Systeme—Design Methodology for Mechatronic Systems; Technical Report VDI 2206; VDI—Verein Deutscher Ingenieure: Dusseldorf, Germany, 2004.
- Scicoslab Web Site. Available online: http://www.scicoslab.org. (accessed on 30 June 2020).
- Simulink® Web Site. Available online: http://www.mathworks.com/products/simulink (accessed on 30 June 2020).
- Dell’Amico, A.; Krus, P. Modeling, Simulation, and Experimental Investigation of an Electrohydraulic Closed-Center Power Steering System. IEEE/ASME Trans. Mechatronics 2015, 20, 2452–2462. [Google Scholar] [CrossRef] [Green Version]
- Orszulik, R.R.; Gabbert, U. An Interface Between Abaqus and Simulink for High-Fidelity Simulations of Smart Structures. IEEE/ASME Trans. Mechatronics 2016, 21, 879–887. [Google Scholar] [CrossRef]
- Isermann, R.; Schaffnit, J.; Sinsel, S. Hardware-in-the-loop simulation for the design and testing of engine-control systems. Control Eng. Pract. 1999, 7, 643–653. [Google Scholar] [CrossRef]
- Gomes, C.; Thule, C.; Broman, D.; Larsen, P.G.; Vangheluwe, H. Co-Simulation: A Survey. ACM Comput. Surv. 2018, 51, 49:1–49:33. [Google Scholar] [CrossRef]
- Ryan, R. ADAMS—Multibody System Analysis Software. In Multibody Systems Handbook; Schiehlen, W., Ed.; Springer: Berlin/Heidelberg, Germany, 2010; pp. 361–402. [Google Scholar] [CrossRef]
- Hadas, Z.; Březina, T.; Andrs, O.; Vetiska, J.; Březina, L. Simulation modelling of mechatronic system with flexible parts. In Proceedings of the 15th International Power Electronics and Motion Control Conference (EPE/PEMC), Novi Sad, Serbia, 4–6 December 2012; pp. LS2e.1-1–LS2e.1-7. [Google Scholar] [CrossRef]
- Friedenthal, S.; Moore, A.; Steiner, R. A Practical Guide to SysML—The Systems Modeling Language; Morgan Kaufmann: Burlington, MA, USA, 2015. [Google Scholar] [CrossRef]
- Sadovykh, A.; Bagnato, A.; Quadri, I.; Mady, A.; Couto, L.; Basagiannis, S.; Hasanagic, M. SysML as a Common Integration Platform for CoSimulations: Example of a Cyber Physical System Design Methodology in Green Heating Ventilation and Air Conditioning Systems. In CEE-SECR 2016: Proceedings of the 12th Central & Eastern European Software Engineering Conference, Moscow, Russia, 28–29 October 2016; Association for Computing Machinery: New York, NY, USA, 2016; pp. 1:1–1:5. [Google Scholar] [CrossRef]
- Foldager, F.; Larsen, P.; Green, O. Development of a Driverless Lawn Mower using Co-Simulation. In Software Engineering and Formal Methods: Proceedings of the International Conference on Software Engineering and Formal Methods, SEFM 2017, Trento, Italy, 6–10 September 2017; Cerone, A., Roveri, M., Eds.; Springer: Cham, Switzerland; Volume 10729, pp. 330–344. [CrossRef]
- Giese, H.; Burmester, S.; Schäfer, W.; Oberschelp, O. Modular Design and Verification of Component-based Mechatronic Systems with Online-reconfiguration. SIGSOFT Softw. Eng. Notes 2004, 29, 179–188. [Google Scholar] [CrossRef]
- Agrawal, A.; Simon, G.; Karsai, G. Semantic Translation of Simulink/Stateflow Models to Hybrid Automata Using Graph Transformations. Electron. Notes Theor. Comput. Sci. 2004, 109, 43–56. [Google Scholar] [CrossRef] [Green Version]
- Lindahl, M.; Pettersson, P.; Yi, W. Formal Design and Analysis of a Gearbox Controller. Springer Int. J. Softw. Tools Technol. Transf. 2001, 3, 353–368. [Google Scholar] [CrossRef]
- Cimatti, A.; Griggio, A.; Mover, S.; Tonetta, S. HyComp: An SMT-Based Model Checker for Hybrid Systems. In Tools and Algorithms for the Construction and Analysis of Systems; Baier, C., Tinelli, C., Eds.; Springer: Berlin/Heidelberg, Germany, 2011; Volume 9035, Lecture Notes in Computer Science; pp. 52–67. [Google Scholar] [CrossRef]
- Cimatti, A.; Griggio, A.; Mover, S.; Tonetta, S. Parameter synthesis with IC3. In Proceedings of the Formal Methods in Computer-Aided Design, Portland, OR, USA, 20–23 October 2013; pp. 165–168. [Google Scholar] [CrossRef]
- Fulton, N.; Mitsch, S.; Quesel, J.D.; Völp, M.; Platzer, A. KeYmaera X: An axiomatic tactical theorem prover for hybrid systems. In Proceedings of the International Conference on Automated Deduction, Berlin, Germany, 1–7 August 2015; Springer: Berlin, Germany, 2015; pp. 527–538. [Google Scholar] [CrossRef]
- Platzer, A. Logics of Dynamical Systems. In Proceedings of the 27th Annual IEEE Symposium on Logic in Computer Science, Dubrovnik, Croatia, 25–28 June 2012; pp. 13–24. [Google Scholar] [CrossRef] [Green Version]
- Owre, S.; Rushby, J.; Shankar, N. PVS: A prototype verification system. In Automated Deduction—CADE-11; Kapur, D., Ed.; Springer: Berlin/Heidelberg, Germany, 1992; Lecture Notes in Computer Science; Volume 607, pp. 748–752. [Google Scholar] [CrossRef]
- Bernardeschi, C.; Domenici, A.; Masci, P. A PVS-Simulink Integrated Environment for Model-Based Analysis of Cyber-Physical Systems. IEEE Trans. Softw. Eng. 2018, 44, 512–533. [Google Scholar] [CrossRef]
- Palmieri, M.; Bernardeschi, C.; Masci, P. A framework for FMI-based co-simulation of human–machine interfaces. Softw. Syst Model 2019. [Google Scholar] [CrossRef]
- Muñoz, C.; Narkawicz, A.; Hagen, G.; Upchurch, J.; Dutle, A.; Consiglio, M. DAIDALUS: Detect and Avoid Alerting Logic for Unmanned Systems. In Proceedings of the 34th Digital Avionics Systems Conference (DASC 2015), Liverpool, UK, 26–28 October 2015. [Google Scholar] [CrossRef] [Green Version]
- Bernardeschi, C.; Domenici, A. Verifying safety properties of a nonlinear control by interactive theorem proving with the Prototype Verification System. Inf. Process. Lett. 2016, 116, 409–415. [Google Scholar] [CrossRef]
- Grimm, T.; Lettnin, D.; Hübner, M. A survey on formal verification techniques for safety-critical systems-on-chip. Electronics 2018, 7, 81. [Google Scholar] [CrossRef] [Green Version]
- Jia, K.; Xiao, J.; Fan, S.; He, G. A MQTT/MQTT-SN-based user energy management system for automated residential demand response: Formal verification and cyber-physical performance evaluation. Appl. Sci. 2018, 8, 1035. [Google Scholar] [CrossRef] [Green Version]
- Larsen, P.G.; Fitzgerald, J.; Woodcock, J.; Fritzson, P.; Brauer, J.; Kleijn, C.; Lecomte, T.; Pfeil, M.; Green, O.; Basagiannis, S.; et al. Integrated tool chain for model-based design of Cyber-Physical Systems: The INTO-CPS project. In Proceedings of the 2nd International Workshop on Modelling, Analysis, and Control of Complex CPS (CPS Data), Pittsburgh, PA, USA, 21–23 March 2016; pp. 1–6. [Google Scholar] [CrossRef] [Green Version]
- Owre, S.; Rushby, J.; Shankar, N.; Von Henke, F. Formal verification for fault-tolerant architectures: Prolegomena to the design of PVS. IEEE Trans. Softw. Eng. 1995, 21, 107–125. [Google Scholar] [CrossRef] [Green Version]
- Blochwitz, T.; Otter, M.; Akesson, J.; Arnold, M.; Clauß, C.; Elmqvist, H.; Friedrich, M.; Junghanns, A.; Mauss, J.; Neumerkel, D.; et al. Functional Mockup Interface 2.0: The Standard for Tool independent Exchange of Simulation Models. In Proceedings of the 9th International MODELICA Conference, Munich, Germany, 3–5 September 2012; Linköping University Electronic Press: Linkoping, Sweden, 2012. Number 76 in Linköping Electronic Conference Proceedings. pp. 173–184. [Google Scholar] [CrossRef] [Green Version]
- Dini, P.; Saponara, S. Design of an Observer-Based Architecture and Non-Linear Control Algorithm for Cogging Torque Reduction in Synchronous Motors. Energies 2020, 13, 2077. [Google Scholar] [CrossRef]
- Isidori, A. Nonlinear Control Systems; Communications and Control Engineering; Springer: London, UK, 1995. [Google Scholar]
- Pulle, D.; Darnell, P.; Veltman, A. Applied Control of Electrical Drives: Real Time Embedded and Sensorless Control Using VisSimTM and PLECSTM; Power Systems; Springer International Publishing: Berlin, Germany, 2015. [Google Scholar]
- Bernardeschi, C.; Dini, P.; Domenici, A.; Saponara, S. Co-simulation and Verification of a Non-linear Control System for Cogging Torque Reduction in Brushless Motors. In Proceedings of the 3rd Workshop on Formal Co-Simulation of Cyber-Physical Systems—A satellite event of SEFM2019, Oslo, Norway, 18–20 September 2019. [Google Scholar]
- Gerling, D. Electrical Machines; Springer: Berlin, Germany, 2016. [Google Scholar]
- Gamble, C. DSE in the INTO-CPS Platform; Technical Report D5.3e; INTO-CPS Deliverable: Aarhus, Denmark, 2017. [Google Scholar]
Symbol | Value | Parameter |
---|---|---|
10 | number of stator teeth | |
3 | number of pole pairs | |
4.0 | amplitude of cogging torque’s first harmonic | |
0.009 rad | phase of cogging torque’s first harmonic | |
3.3 | resistance | |
0.05 H | inductance | |
0.5 Wb | magnetic flux | |
0.01 | rotational inertia | |
0.01 | friction coefficient |
Variable | Quantity |
---|---|
a-, b-, c-components of current | |
a-, b-, c-components of voltage | |
a-, b-, c-components of electromotive force | |
direct and quadrature components of current | |
direct and quadrature components of voltage | |
angular position and velocity | |
desired values of and | |
electromagnetic and cogging torques | |
control voltages |
Coefficient | Value | Coefficient | Value |
---|---|---|---|
4040 | 1,237,529 | ||
9/1000 | 153,666,659/90,000 | ||
1,597,813,728,139/27,000,000 | 6371/300 |
Rank | L | ||||
---|---|---|---|---|---|
1 | 133.225808994 | 0.4520951516 | 0.0425 | 10 | −200,000 |
2 | 182.338023217 | 0.6207469189 | 0.05 | 10 | −200,000 |
3 | 203.174600076 | 0.7698643094 | 0.0425 | 10 | −250,000 |
4 | 238.510251169 | 0.8146819387 | 0.0575 | 10 | −200,000 |
5 | 284.764456886 | 1.056688425 | 0.05 | 10 | −250,000 |
6 | 389.645017067 | 1.393178146 | 0.0575 | 10 | −250,000 |
7 | 390.725315887 | 2.4496935013 | 0.0425 | 20 | −200,000 |
8 | 536.217360079 | 3.1270257044 | 0.05 | 20 | −200,000 |
9 | 606.28853597 | 3.9126048439 | 0.0425 | 20 | −250,000 |
10 | 681.333349658 | 3.9590184538 | 0.0575 | 20 | −200,000 |
11 | 764.927467024 | 5.9664482285 | 0.0425 | 30 | −200,000 |
11 | 792.274533863 | 5.0855301421 | 0.05 | 20 | −250,000 |
12 | 991.117882891 | 7.5735576985 | 0.05 | 30 | −200,000 |
12 | 1034.82060285 | 6.5027556699 | 0.0575 | 20 | −250,000 |
13 | 1146.74688913 | 9.5474224247 | 0.0425 | 30 | −250,000 |
13 | 1244.20686295 | 9.3341197085 | 0.0575 | 30 | −200,000 |
14 | 1474.30527198 | 12.1749251909 | 0.05 | 30 | −250,000 |
15 | 1844.30406114 | 15.0481912736 | 0.0575 | 30 | −250,000 |
Rank | L | ||||
---|---|---|---|---|---|
1 | 133.225808994 | 3.0012689667 | 0.0425 | 10 | −200,000 |
1 | 182.338023217 | 2.8554161212 | 0.05 | 10 | −200,000 |
1 | 203.174600076 | 2.6613697359 | 0.0425 | 10 | −250,000 |
1 | 284.764456886 | 2.5666163063 | 0.05 | 10 | −250,000 |
1 | 389.645017067 | 2.5096108736 | 0.0575 | 10 | −250,000 |
2 | 238.510251169 | 2.6658599693 | 0.0575 | 10 | −200,000 |
3 | 390.725315887 | 13.5604089712 | 0.0425 | 20 | −200,000 |
3 | 536.217360079 | 13.3507337866 | 0.05 | 20 | −200,000 |
3 | 606.28853597 | 12.5238422201 | 0.0425 | 20 | −250,000 |
3 | 792.274533863 | 12.0083838635 | 0.05 | 20 | −250,000 |
4 | 681.333349658 | 13.0097947735 | 0.0575 | 20 | −200,000 |
4 | 1034.82060285 | 12.0973710284 | 0.0575 | 20 | −250,000 |
5 | 764.927467024 | 33.6920496 | 0.0425 | 30 | −200,000 |
5 | 991.117882891 | 32.6884214852 | 0.05 | 30 | −200,000 |
5 | 1146.74688913 | 31.0693366505 | 0.0425 | 30 | −250,000 |
5 | 1474.30527198 | 30.6858006581 | 0.05 | 30 | −250,000 |
6 | 1244.20686295 | 32.611319147 | 0.0575 | 30 | −200,000 |
6 | 1844.30406114 | 31.0435733541 | 0.0575 | 30 | −250,000 |
Rank | L | ||||
---|---|---|---|---|---|
1 | 2.5096108736 | 1.393178146 | 0.0575 | 10 | −250,000 |
1 | 2.5666163063 | 1.056688425 | 0.05 | 10 | −250,000 |
1 | 2.6613697359 | 0.7698643094 | 0.0425 | 10 | −250,000 |
1 | 2.8554161212 | 0.6207469189 | 0.05 | 10 | −200,000 |
1 | 3.0012689667 | 0.4520951516 | 0.0425 | 10 | −200,000 |
2 | 2.6658599693 | 0.8146819387 | 0.0575 | 10 | −200,000 |
3 | 12.0083838635 | 5.0855301421 | 0.05 | 20 | −250,000 |
3 | 12.5238422201 | 3.9126048439 | 0.0425 | 20 | −250,000 |
3 | 13.3507337866 | 3.1270257044 | 0.05 | 20 | −200,000 |
3 | 13.5604089712 | 2.4496935013 | 0.0425 | 20 | −200,000 |
4 | 12.0973710284 | 6.5027556699 | 0.0575 | 20 | −250,000 |
4 | 13.0097947735 | 3.9590184538 | 0.0575 | 20 | −200,000 |
5 | 30.6858006581 | 12.1749251909 | 0.05 | 30 | −250,000 |
5 | 31.0693366505 | 9.5474224247 | 0.0425 | 30 | −250,000 |
5 | 32.611319147 | 9.3341197085 | 0.0575 | 30 | −200,000 |
5 | 32.6884214852 | 7.5735576985 | 0.05 | 30 | −200,000 |
5 | 33.6920496 | 5.9664482285 | 0.0425 | 30 | −200,000 |
6 | 31.0435733541 | 15.0481912736 | 0.0575 | 30 | −250,000 |
© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Bernardeschi, C.; Dini, P.; Domenici, A.; Palmieri, M.; Saponara, S. Formal Verification and Co-Simulation in the Design of a Synchronous Motor Control Algorithm. Energies 2020, 13, 4057. https://doi.org/10.3390/en13164057
Bernardeschi C, Dini P, Domenici A, Palmieri M, Saponara S. Formal Verification and Co-Simulation in the Design of a Synchronous Motor Control Algorithm. Energies. 2020; 13(16):4057. https://doi.org/10.3390/en13164057
Chicago/Turabian StyleBernardeschi, Cinzia, Pierpaolo Dini, Andrea Domenici, Maurizio Palmieri, and Sergio Saponara. 2020. "Formal Verification and Co-Simulation in the Design of a Synchronous Motor Control Algorithm" Energies 13, no. 16: 4057. https://doi.org/10.3390/en13164057
APA StyleBernardeschi, C., Dini, P., Domenici, A., Palmieri, M., & Saponara, S. (2020). Formal Verification and Co-Simulation in the Design of a Synchronous Motor Control Algorithm. Energies, 13(16), 4057. https://doi.org/10.3390/en13164057