@@ -12,7 +12,7 @@ Output the product of a gain value with the input signal.
12
12
- `input`
13
13
- `output`
14
14
"""
15
- function Gain (k; name)
15
+ @component function Gain (k; name)
16
16
@named siso = SISO ()
17
17
@unpack u, y = siso
18
18
pars = @parameters k= k [description = " Gain of Gain $name " ]
@@ -36,7 +36,7 @@ Output the product of a gain matrix with the input signal vector.
36
36
- `input`
37
37
- `output`
38
38
"""
39
- function MatrixGain (K:: AbstractArray ; name)
39
+ @component function MatrixGain (K:: AbstractArray ; name)
40
40
nout, nin = size (K, 1 ), size (K, 2 )
41
41
@named input = RealInput (; nin = nin)
42
42
@named output = RealOutput (; nout = nout)
@@ -58,7 +58,7 @@ Output the sum of the elements of the input port vector.
58
58
- `input`
59
59
- `output`
60
60
"""
61
- function Sum (n:: Int ; name)
61
+ @component function Sum (n:: Int ; name)
62
62
@named input = RealInput (; nin = n)
63
63
@named output = RealOutput ()
64
64
eqs = [
@@ -78,7 +78,7 @@ Output difference between reference input (input1) and feedback input (input2).
78
78
- `input2`
79
79
- `output`
80
80
"""
81
- function Feedback (; name)
81
+ @component function Feedback (; name)
82
82
@named input1 = RealInput ()
83
83
@named input2 = RealInput ()
84
84
@named output = RealOutput ()
@@ -104,7 +104,7 @@ Output the sum of the two scalar inputs.
104
104
- `input2`
105
105
- `output`
106
106
"""
107
- function Add (; name, k1 = 1 , k2 = 1 )
107
+ @component function Add (; name, k1 = 1 , k2 = 1 )
108
108
@named input1 = RealInput ()
109
109
@named input2 = RealInput ()
110
110
@named output = RealOutput ()
@@ -134,7 +134,7 @@ Output the sum of the three scalar inputs.
134
134
- `input3`
135
135
- `output`
136
136
"""
137
- function Add3 (; name, k1 = 1 , k2 = 1 , k3 = 1 )
137
+ @component function Add3 (; name, k1 = 1 , k2 = 1 , k3 = 1 )
138
138
@named input1 = RealInput ()
139
139
@named input2 = RealInput ()
140
140
@named input3 = RealInput ()
@@ -159,7 +159,7 @@ Output product of the two inputs.
159
159
- `input2`
160
160
- `output`
161
161
"""
162
- function Product (; name)
162
+ @component function Product (; name)
163
163
@named input1 = RealInput ()
164
164
@named input2 = RealInput ()
165
165
@named output = RealOutput ()
@@ -180,7 +180,7 @@ Output first input divided by second input.
180
180
- `input2`
181
181
- `output`
182
182
"""
183
- function Division (; name)
183
+ @component function Division (; name)
184
184
@named input1 = RealInput ()
185
185
@named input2 = RealInput (u_start = 1.0 ) # denominator can not be zero
186
186
@named output = RealOutput ()
@@ -202,7 +202,7 @@ If the given function is not composed of simple core methods (e.g. sin, abs, ...
202
202
- `input`
203
203
- `output`
204
204
"""
205
- function StaticNonLinearity (func; name)
205
+ @component function StaticNonLinearity (func; name)
206
206
@named siso = SISO ()
207
207
@unpack u, y = siso
208
208
eqs = [y ~ func (u)]
@@ -218,7 +218,7 @@ Output the absolute value of the input.
218
218
219
219
See [`StaticNonLinearity`](@ref)
220
220
"""
221
- Abs (; name) = StaticNonLinearity (abs; name)
221
+ @component Abs (; name) = StaticNonLinearity (abs; name)
222
222
223
223
"""
224
224
Sign(;name)
@@ -229,7 +229,7 @@ Output the sign of the input
229
229
230
230
See [`StaticNonLinearity`](@ref)
231
231
"""
232
- Sign (; name) = StaticNonLinearity (sign; name)
232
+ @component Sign (; name) = StaticNonLinearity (sign; name)
233
233
234
234
"""
235
235
Sqrt(;name)
@@ -240,7 +240,7 @@ Output the square root of the input (input >= 0 required).
240
240
241
241
See [`StaticNonLinearity`](@ref)
242
242
"""
243
- Sqrt (; name) = StaticNonLinearity (sqrt; name)
243
+ @component Sqrt (; name) = StaticNonLinearity (sqrt; name)
244
244
245
245
"""
246
246
Sin(;name)
@@ -251,7 +251,7 @@ Output the sine of the input.
251
251
252
252
See [`StaticNonLinearity`](@ref)
253
253
"""
254
- Sin (; name) = StaticNonLinearity (sin; name)
254
+ @component Sin (; name) = StaticNonLinearity (sin; name)
255
255
256
256
"""
257
257
Cos(;name)
@@ -262,7 +262,7 @@ Output the cosine of the input.
262
262
263
263
See [`StaticNonLinearity`](@ref)
264
264
"""
265
- Cos (; name) = StaticNonLinearity (cos; name)
265
+ @component Cos (; name) = StaticNonLinearity (cos; name)
266
266
267
267
"""
268
268
Tan(;name)
@@ -273,7 +273,7 @@ Output the tangent of the input.
273
273
274
274
See [`StaticNonLinearity`](@ref)
275
275
"""
276
- Tan (; name) = StaticNonLinearity (tan; name)
276
+ @component Tan (; name) = StaticNonLinearity (tan; name)
277
277
278
278
"""
279
279
Asin(;name)
@@ -284,7 +284,7 @@ Output the arc sine of the input.
284
284
285
285
See [`StaticNonLinearity`](@ref)
286
286
"""
287
- Asin (; name) = StaticNonLinearity (asin; name)
287
+ @component Asin (; name) = StaticNonLinearity (asin; name)
288
288
289
289
"""
290
290
Acos(;name)
@@ -295,7 +295,7 @@ Output the arc cosine of the input.
295
295
296
296
See [`StaticNonLinearity`](@ref)
297
297
"""
298
- Acos (; name) = StaticNonLinearity (acos; name)
298
+ @component Acos (; name) = StaticNonLinearity (acos; name)
299
299
300
300
"""
301
301
Atan(;name)
@@ -306,7 +306,7 @@ Output the arc tangent of the input.
306
306
307
307
See [`StaticNonLinearity`](@ref)
308
308
"""
309
- Atan (; name) = StaticNonLinearity (atan; name)
309
+ @component Atan (; name) = StaticNonLinearity (atan; name)
310
310
311
311
"""
312
312
Atan2(;name)
@@ -319,7 +319,7 @@ Output the arc tangent of the input.
319
319
- `input2`
320
320
- `output`
321
321
"""
322
- function Atan2 (; name)
322
+ @component function Atan2 (; name)
323
323
@named input1 = RealInput ()
324
324
@named input2 = RealInput ()
325
325
@named output = RealOutput ()
@@ -338,7 +338,7 @@ Output the hyperbolic sine of the input.
338
338
339
339
See [`StaticNonLinearity`](@ref)
340
340
"""
341
- Sinh (; name) = StaticNonLinearity (sinh; name)
341
+ @component Sinh (; name) = StaticNonLinearity (sinh; name)
342
342
343
343
"""
344
344
Cosh(;name)
@@ -349,7 +349,7 @@ Output the hyperbolic cosine of the input.
349
349
350
350
See [`StaticNonLinearity`](@ref)
351
351
"""
352
- Cosh (; name) = StaticNonLinearity (cosh; name)
352
+ @component Cosh (; name) = StaticNonLinearity (cosh; name)
353
353
354
354
"""
355
355
Tanh(;name)
@@ -360,7 +360,7 @@ Output the hyperbolic tangent of the input.
360
360
361
361
See [`StaticNonLinearity`](@ref)
362
362
"""
363
- Tanh (; name) = StaticNonLinearity (tanh; name)
363
+ @component Tanh (; name) = StaticNonLinearity (tanh; name)
364
364
365
365
"""
366
366
Exp(;name)
@@ -371,7 +371,7 @@ Output the exponential (base e) of the input.
371
371
372
372
See [`StaticNonLinearity`](@ref)
373
373
"""
374
- Exp (; name) = StaticNonLinearity (exp; name)
374
+ @component Exp (; name) = StaticNonLinearity (exp; name)
375
375
376
376
"""
377
377
Log(;name)
@@ -382,7 +382,7 @@ Output the natural (base e) logarithm of the input.
382
382
383
383
See [`StaticNonLinearity`](@ref)
384
384
"""
385
- Log (; name) = StaticNonLinearity (log; name)
385
+ @component Log (; name) = StaticNonLinearity (log; name)
386
386
387
387
"""
388
388
Log10(;name)
@@ -393,4 +393,4 @@ Output the base 10 logarithm of the input.
393
393
394
394
See [`StaticNonLinearity`](@ref)
395
395
"""
396
- Log10 (; name) = StaticNonLinearity (log10; name)
396
+ @component Log10 (; name) = StaticNonLinearity (log10; name)
0 commit comments