Position Control
-
- Posts: 25
- Joined: 16 Dec 2015, 02:16 [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
Re: Position Control
The current control loop also runs at half the switching frequency. The dead time has not much to do with the control loops, it is just a short delay that is inserted between swithcing off a high side FET and switching on a low side FET (or the other way) to prevent cross conduction. The DTc field in the FOC tab does not affect the dead time, but it adds a compensation to the modulated voltage calculation for the dead time effect, which helps the observer track better at low speeds (which is where dead time distortion has the largest effect).
-
- Posts: 25
- Joined: 16 Dec 2015, 02:16 [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
Re: Position Control
Great, thanks for the reply. The maximum switching frequency allowed to enter in the bldc-tool GUI is 99.9 kHz, so that would imply the maximum current control loop is around 50kHz.
Is this a hard limit of the VESC, or would it be possible to increase the maximum switching frequency even further (say to 160 or 200 kHz)?
Thanks!
Erwin
Is this a hard limit of the VESC, or would it be possible to increase the maximum switching frequency even further (say to 160 or 200 kHz)?
Thanks!
Erwin
Re: Position Control
The 99 KHz limit is in BLDC Tool, but even running that fast might not work. Based on the computational requirements, it is currently possible to run at 120 KHz switching frequency (60 KHz for the control loops). However, driving the FETs that fast is not possible, and as far as I can tell it does not make sense to switch that fast. The system won't become more quiet after 40 KHz and the control loops are more than fast enough based on the motor time constants for most outrunners I have tested.
-
- Posts: 85
- Joined: 10 Aug 2016, 16:14 [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
Re: Position Control
Hi guys,
where did the "VESC_encoder.bin" go? I want to do some position control but the file is no longer there as seen on the video at the first post...
I also can't find it on Github.
Thanks.
where did the "VESC_encoder.bin" go? I want to do some position control but the file is no longer there as seen on the video at the first post...
I also can't find it on Github.
Thanks.
-
- Posts: 85
- Joined: 10 Aug 2016, 16:14 [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
Re: Position Control
Hi,
what type of actual-value sensor-encoder do you use at 6:54 in your video of your first post?
what type of actual-value sensor-encoder do you use at 6:54 in your video of your first post?
-
- Posts: 19
- Joined: 29 May 2017, 20:47
- Location: Bordeaux [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
Re: Position Control
Hi guys, just starting working on position control with VESC and hall sensor motor.
I try to control the VESC using arduino and UART and so far it's working pretty well with other command ( set speed, setcurrent brake, set duty ).
So I update the librairies like this :
added in VescUart.cpp
void VescUartSetPos(float pos) {
int32_t index = 0;
uint8_t payload[5];
payload[index++] = COMM_SET_POS;
buffer_append_int32(payload, (int32_t)(pos), &index);
PackSendPayload(payload, 5);
}
added in VescUart.h :
void VescUartSetPos (float pos);
then I just have to send the command on the arduino. Altough it worked ( the motor is positionning and holding with respect to PID setting ) , it only works for VescUartSetPos(0) ? I can put whatever number I want, the value is ignored and the motor is only positionning at 0° angle.
Does anyone can help on that issue ?
Olivier
I try to control the VESC using arduino and UART and so far it's working pretty well with other command ( set speed, setcurrent brake, set duty ).
So I update the librairies like this :
added in VescUart.cpp
void VescUartSetPos(float pos) {
int32_t index = 0;
uint8_t payload[5];
payload[index++] = COMM_SET_POS;
buffer_append_int32(payload, (int32_t)(pos), &index);
PackSendPayload(payload, 5);
}
added in VescUart.h :
void VescUartSetPos (float pos);
then I just have to send the command on the arduino. Altough it worked ( the motor is positionning and holding with respect to PID setting ) , it only works for VescUartSetPos(0) ? I can put whatever number I want, the value is ignored and the motor is only positionning at 0° angle.
Does anyone can help on that issue ?
Olivier
-
- Posts: 310
- Joined: 28 Mar 2016, 14:37
- Location: FR Valence [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
Re: Position Control
Seems like an issue in float to int32 conversion ? I think you only cast your float as an int32 when you should convert the float value to an int value.
Something like : (int32_t)(pos * 1)... would be better probably.
Something like : (int32_t)(pos * 1)... would be better probably.
-
- Posts: 19
- Joined: 29 May 2017, 20:47
- Location: Bordeaux [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
Re: Position Control
hello pf26. thnaks for the help and also for past helps
.
it does not works, tried with integer instead if fkoat, same effect. now I'm stuck .. Grrrrr


it does not works, tried with integer instead if fkoat, same effect. now I'm stuck .. Grrrrr


Who is online
Users browsing this forum: No registered users and 2 guests