-
Notifications
You must be signed in to change notification settings - Fork 1
/
example.toml
153 lines (129 loc) · 4.39 KB
/
example.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
#This is example configuration file that can be converted to binary using TOML2BIN Converter
title = "Configuration Example"
version="1.0"
ConfigVersion="1.0"
created = "2023-03-01"
last_modified = "2023-03-15"
test_date_time = 2023-06-26T08:30:00
test_time = 08:30:00
phoenix_date = 2023-06-26
author = "Boris Radonic"
description = """
This configuration file defines the parameters for the motor control system,
including plant setup, power supply configurations, and individual motor
controller settings.
"""
environment = "Test"
#System parameters
Ts = 0.0001 #Sample time
SystemClockFrequency= 1000 #1Khz System takt
[[Plant.Motors]]
index = 0
name = "Motor1"
p = 1 #Number of pole pairs
b = 0.00047 #Combined friction of rotor and load
Kemf = 0.1327 #Back EMF constant is the peak voltage induced by the permanent magnet in the per-unit rotational speed of each of the phases.
J = 0.074 #Combined moment of inertia of rotor and load
Rs = 1.1 #Stator resistance in [Ohm]
Lq = 0.00784 #Inductance of stator in dq frame (q part) in [H]
Ld = 0.00784 # Inductance of stator in dq frame (d part) in [H]
Ktq = 0.83 # Torque constant in [A/Nm]
Fs = 0.01 # Static driction in Nm
PeakTorque = 14.30 #Peak torque in Nm ( Base speed 2000 rpm )
[[Plant.Motors]]
index = 1
name = "Motor2"
p = 1 #Number of pole pairs
b = 0.00047 #Combined friction of rotor and load
Kemf = 0.1327 #Back EMF constant is the peak voltage induced by the permanent magnet in the per-unit rotational speed of each of the phases.
J = 0.074 #Combined moment of inertia of rotor and load
Rs = 1.1 #Stator resistance in [Ohm]
Lq = 0.00784 #Inductance of stator in dq frame (q part) in [H]
Ld = 0.00784 # Inductance of stator in dq frame (d part) in [H]
Ktq = 0.83 # Torque constant in [A/Nm]
Fs = 0.01 # Static driction in Nm
PeakTorque = 14.30 #Peak torque in Nm ( Base speed 2000 rpm )
[PowerSupply]
DCBusVoltage = 320.00
[Controller.Motor1]
NegativePositionLimit = -10000.00 # Position limit in [mm]
PositivePositionLimit = -10000.00 # Position limit in [mm]
MaxVelocity = 300.00
MaxTorque = 12.00
MaxAcceleration = 200.00
MaxJerk = 5000.00
[Controller.Motor1.PosController]
FFVelocityGain = 1.00
FFAccelGain = 1.00
FFJerkGain = 0.00
Kp = 35.00
[Controller.Motor1.VelocityController]
Kp = 3.6
Ki = 0.6
PreFilterFrequency = 3200.00
UsePreFilter = false
IIRFilter = { a1 = 0.00, b0 = 0.00, b1 = 0.00 }
[Controller.Motor1.CurrentController.QSide]
Kp = 20.00 # Proportional gain coefficient
Ki = 20000.00 # Integral gain coefficient
Kd = 0.00 # Derivative gain coefficient (not typically used in PI)
Kb = 1.00 # Anti-windup gain coefficient
UpSat = 300.00 # Output saturation upper limit
[Controller.Motor1.CurrentController.DSide]
Kp = 20.00 # Proportional gain coefficient
Ki = 20000.00 # Integral gain coefficient
Kd = 0.00 # Derivative gain coefficient (not typically used in PI)
Kb = 1.00 # Anti-windup gain coefficient
UpSat = 300.00 # Output saturation upper limit
[Controller.Motor1.CurrentController.IIRFilter]
a1 = -0.90483741803595952
b0 = 0.095162581964040482
b1 = 0.00
[Testing.test1]
NumberOfSteps=6
Steps = [ 0.11, 0.22, 0.55, 0.66, 1.76, 2.11 ]
[[digitalInputs]]
port = 2
state = 0 # 0=Low, 1=High
description = "Stop button"
[[digitalInputs]]
port = 3
state = 0 # 0=Low, 1=High
description = "Emergency stop"
[[DigitalOutputs]]
name = "Output1"
port = 1
state = 1 # 0=Low, 1=High
description = "Main power relay"
[[DigitalOutputs]]
name = "Output2"
port = 2
state = 0 # 0=Low, 1=High
description = "Auxiliary light"
[[DigitalOutputs]]
name = "Output3"
port = 3
state = 1 # 0=Low, 1=High
description = "Alarm system trigger"
[UART1]
BaudRate = 115200
DataBits = 8
StopBits = 1
Parity = 0 # 0=None, 1=Odd, 2=Even, 3=Mark, 4=Space
FlowControl = 0 # 0=None, 1=RTS/CTS, 2=XON/XOFF
ReadTimeout = 1000 # in milliseconds
WriteTimeout = 1000 # in milliseconds
[UART2]
BaudRate = 115200
DataBits = 8
StopBits = 1
Parity = 0 # 0=None, 1=Odd, 2=Even, 3=Mark, 4=Space
FlowControl = 0 # 0=None, 1=RTS/CTS, 2=XON/XOFF
ReadTimeout = 1000 # in milliseconds
WriteTimeout = 1000 # in milliseconds
[NetworkSettings]
UseDHCP = false
IPAddress = "192.168.1.100"
SubnetMask = "255.255.255.0"
Gateway = "192.168.1.1"
DNS = ["8.8.8.8", "8.8.4.4"]