@@ -9,16 +9,18 @@ using Logging; errlogger = ConsoleLogger(stderr, Error);
99old_logger = global_logger(); global_logger(errlogger);
1010```
1111
12- ## Pendulum Example
12+ ## Pendulum Model
1313
1414This example integrates the simple pendulum model of the [ last section] (@ref man_nonlin) in the
15- [ ModelingToolkit.jl] ( https://docs.sciml.ai/ModelingToolkit/stable/ ) (MTK) framework and
16- extracts appropriate ` f! ` and ` h! ` functions to construct a [ ` NonLinModel ` ] ( @ref ) .
15+ [ ` ModelingToolkit.jl ` ] ( https://docs.sciml.ai/ModelingToolkit/stable/ ) (MTK) framework and
16+ extracts appropriate ` f! ` and ` h! ` functions to construct a [ ` NonLinModel ` ] ( @ref ) . An
17+ [ ` NonLinMPC ` ] ( @ref ) is designed from this model and simulated to reproduce the results of
18+ the last section.
1719
1820!!! danger "Disclaimer"
1921 This simple example is not an official interface to ` ModelingToolkit.jl ` . It is provided
20- as a basic starting point template to combine both packages. There is no guarantee that
21- it will work for all corner cases.
22+ as a basic starting template to combine both packages. There is no guarantee that it
23+ will work for all corner cases.
2224
2325We first construct and instantiate the pendulum model:
2426
@@ -93,6 +95,8 @@ f_plant, h_plant, _, _ = generate_f_h(mtk_model, inputs, outputs)
9395plant = setname!(NonLinModel(f_plant, h_plant, Ts, nu, nx, ny); u=vu, x=vx, y=vy)
9496```
9597
98+ ## Controller Design
99+
96100We can than reproduce the Kalman filter and the controller design of the [ last section] (@ref man_nonlin):
97101
98102``` @example 1
@@ -127,6 +131,8 @@ savefig("plot2_MTK.svg"); nothing # hide
127131
128132![ plot2_MTK] ( plot2_MTK.svg )
129133
134+ ## Acknowledgement
135+
130136Authored by ` 1-Bart-1 ` and ` baggepinnen ` , thanks for the contribution.
131137
132138``` @setup 1
0 commit comments