Jump to content
OMRON Forums

Mode of operation


odoardo

Recommended Posts

Hi,

I would implement control technique with Power Brick AC:

I have two 3-phase Brushless Motors , but i'm a bit confused on which mode of operation (Motor Control Modes) takes and about different task perform by controller or Amplifier.

 

The objective is to control two motors for moving an antenna (in Azimurh and Elevation), in antenna tracking application (UAV tracking), Where my input are:

 

. Angular position (precomputed) of motors in order to follow antenna (external digital signal) --> Desired Position.

. Quadrature encoder of two motors ----> Measured Position

. Hall Current sensor from motors.

. Maximum velocity that antenna has to reach (40°/s for both axes).

 

I want that my output command of controller PMAC in pseudo-language is:

 

Motor movement = Desired Position - Measured Position ====> in order to reach Desired Position

 

Which mode of operation is suitable given my inputs?

 

For example if i close only Position loop inside controller PMAC I perform Position servo loop setup/tuning.

How should I handle velocity and current loop inside the amplifier? I have to perform loop setup/tuning also for velocity and current loop?

 

Forgive me for my trivial question, but i'm new of Power PMAC devices

Thank you for answer.

Link to comment
Share on other sites

  • Replies 19
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

I would implement control technique with Power Brick AC:

I have two 3-phase Brushless Motors , but i'm a bit confused on which mode of operation (Motor Control Modes) takes and about different task perform by controller or Amplifier.

 

The objective is to control two motors for moving an antenna (in Azimurh and Elevation), in antenna tracking application (UAV tracking), Where my input are:

 

. Angular position (precomputed) of motors in order to follow antenna (external digital signal) --> Desired Position.

. Quadrature encoder of two motors ----> Measured Position

. Hall Current sensor from motors.

. Maximum velocity that antenna has to reach (40°/s for both axes).

 

I want that my output command of controller PMAC in pseudo-language is:

 

Motor movement = Desired Position - Measured Position ====> in order to reach Desired Position

 

Which mode of operation is suitable given my inputs?

 

For example if i close only Position loop inside controller PMAC I perform Position servo loop setup/tuning.

How should I handle velocity and current loop inside the amplifier? I have to perform loop setup/tuning also for velocity and current loop?

 

Forgive me for my trivial question, but i'm new of Power PMAC devices

Thank you for answer.

loop.PNG.e5ceaf4e0105c662714ba2bb7003bf0b.PNG

Link to comment
Share on other sites

For 3-phase brushless motors on Power Brick AC, you should close the current loop, position loop and velocity loop. The servo loop receives your desired trajectory as a position command and PMAC takes care of the torque command to the motors required to achieve that.

 

Choose direct PWM control mode for your amplifier. Tuning the velocity loop comprises just adding velocity gains (Motor[x].Servo.Kvfb and Kvff) in addition to the position loop gains. All of this should be handled more or less automatically in the System Setup software. Have you used that software to try to set these motors up yet? If you want some tips and do not want to come to training, you can check out some tutorials we posted on setting up Brushless DC motors using System Setup on our YouTube account, starting with this one:

 

 

This tutorial is for UMAC, but the setup is similar for Power Brick.

 

Lastly, for your position following to the external encoder, you will need to point your follower motor to the master motor using Motor[x].pMasterEnc and MasterCtrl.

 

See pages 627 to 633 of the Power PMAC User's Manual for more details.

Link to comment
Share on other sites

For 3-phase brushless motors on Power Brick AC, you should close the current loop, position loop and velocity loop. The servo loop receives your desired trajectory as a position command and PMAC takes care of the torque command to the motors required to achieve that.

 

Choose direct PWM control mode for your amplifier. Tuning the velocity loop comprises just adding velocity gains (Motor[x].Servo.Kvfb and Kvff) in addition to the position loop gains. All of this should be handled more or less automatically in the System Setup software. Have you used that software to try to set these motors up yet? If you want some tips and do not want to come to training, you can check out some tutorials we posted on setting up Brushless DC motors using System Setup on our YouTube account, starting with this one:

 

 

This tutorial is for UMAC, but the setup is similar for Power Brick.

 

Lastly, for your position following to the external encoder, you will need to point your follower motor to the master motor using Motor[x].pMasterEnc and MasterCtrl.

 

See pages 627 to 633 of the Power PMAC User's Manual for more details.

Link to comment
Share on other sites

For 3-phase brushless motors on Power Brick AC, you should close the current loop, position loop and velocity loop. The servo loop receives your desired trajectory as a position command and PMAC takes care of the torque command to the motors required to achieve that.

 

Choose direct PWM control mode for your amplifier. Tuning the velocity loop comprises just adding velocity gains (Motor[x].Servo.Kvfb and Kvff) in addition to the position loop gains. All of this should be handled more or less automatically in the System Setup software. Have you used that software to try to set these motors up yet? If you want some tips and do not want to come to training, you can check out some tutorials we posted on setting up Brushless DC motors using System Setup on our YouTube account, starting with this one:

 

 

This tutorial is for UMAC, but the setup is similar for Power Brick.

 

Lastly, for your position following to the external encoder, you will need to point your follower motor to the master motor using Motor[x].pMasterEnc and MasterCtrl.

 

See pages 627 to 633 of the Power PMAC User's Manual for more details.

 

Thank Charles for your valuable advice, I know that the training is the best way to learn and i want do it, but in order to get the scholarship for the training courses, I have to finish this project before!!!

 

I only have one more questions:

 

. Desired angular position of to motors to track antenna is an external analog information in degree (input of my PMAC). After ADC conversion of this external signal is a good technique use Motor[x].ProgJogPos method (in a loop with a refresh time) in order to move motors to a desired position?

Because i don't have a predefined trajectory to perform, but the tracking of a target (UAV).

Link to comment
Share on other sites

For 3-phase brushless motors on Power Brick AC, you should close the current loop, position loop and velocity loop. The servo loop receives your desired trajectory as a position command and PMAC takes care of the torque command to the motors required to achieve that.

 

Choose direct PWM control mode for your amplifier. Tuning the velocity loop comprises just adding velocity gains (Motor[x].Servo.Kvfb and Kvff) in addition to the position loop gains. All of this should be handled more or less automatically in the System Setup software. Have you used that software to try to set these motors up yet? If you want some tips and do not want to come to training, you can check out some tutorials we posted on setting up Brushless DC motors using System Setup on our YouTube account, starting with this one:

 

 

This tutorial is for UMAC, but the setup is similar for Power Brick.

 

Lastly, for your position following to the external encoder, you will need to point your follower motor to the master motor using Motor[x].pMasterEnc and MasterCtrl.

 

See pages 627 to 633 of the Power PMAC User's Manual for more details.

 

Thank Charles for your valuable advice, I know that the training is the best way to learn and i want do it, but in order to get the scholarship for the training courses, I have to finish this project before!!!

 

I only have one more questions:

 

. Desired angular position of to motors to track antenna is an external analog information in degree (input of my PMAC). After ADC conversion of this external signal is a good technique use Motor[x].ProgJogPos method (in a loop with a refresh time) in order to move motors to a desired position?

Because i don't have a predefined trajectory to perform, but the tracking of a target (UAV).

Link to comment
Share on other sites

Hi,

 

You're welcome. However, I do not recommend using ProgJogPos for this.

 

You should create an Encoder Conversion Table (ECT) entry to process your ADC data and then point your slave motor's Motor[x].pMasterEnc to that ECT entry's address.

 

For example, if you use ECT entry 0 for this, you can use

 

Motor[x].pMasterEnc = EncTable[0].a

 

Page 58 of the Power Brick AC manual gives an example of how to set up the ECT for your ADC. It looks like this:

 

Connections and Software Setup 58
Using the ADC for Servo Feedback
Using the ADC data for servo feedback requires bringing it into the Encoder Conversion Table (ECT) into which the motor’s position and velocity elements are assigned to. Example:
EncTable[41].pEnc = PowerBrick[0].Chan[0].AdcAmp[2].a;
EncTable[41].pEnc1 = Sys.pushm;
EncTable[41].index1 = 16;
EncTable[41].index2 = 16;
EncTable[41].index3 = 0;
EncTable[41].index4 = 0;
EncTable[41].index5 = 0;
EncTable[41].ScaleFactor = 1 / EXP2(16);
Motor[9].pEnc = EncTable[41].a;
Motor[9].pEnc2 = EncTable[41].a;

 

If you were using EncTable[41] you would point Motor[x].pMasterEnc=EncTable[41].a, where x is your motor number.

 

Then, to turn on following, set Motor[x].MasterCtrl = 1. The slave motor will follow when closed-loop.

Link to comment
Share on other sites

Hi,

 

You're welcome. However, I do not recommend using ProgJogPos for this.

 

You should create an Encoder Conversion Table (ECT) entry to process your ADC data and then point your slave motor's Motor[x].pMasterEnc to that ECT entry's address.

 

For example, if you use ECT entry 0 for this, you can use

 

Motor[x].pMasterEnc = EncTable[0].a

 

Page 58 of the Power Brick AC manual gives an example of how to set up the ECT for your ADC. It looks like this:

 

Connections and Software Setup 58
Using the ADC for Servo Feedback
Using the ADC data for servo feedback requires bringing it into the Encoder Conversion Table (ECT) into which the motor’s position and velocity elements are assigned to. Example:
EncTable[41].pEnc = PowerBrick[0].Chan[0].AdcAmp[2].a;
EncTable[41].pEnc1 = Sys.pushm;
EncTable[41].index1 = 16;
EncTable[41].index2 = 16;
EncTable[41].index3 = 0;
EncTable[41].index4 = 0;
EncTable[41].index5 = 0;
EncTable[41].ScaleFactor = 1 / EXP2(16);
Motor[9].pEnc = EncTable[41].a;
Motor[9].pEnc2 = EncTable[41].a;

 

If you were using EncTable[41] you would point Motor[x].pMasterEnc=EncTable[41].a, where x is your motor number.

 

Then, to turn on following, set Motor[x].MasterCtrl = 1. The slave motor will follow when closed-loop.

Link to comment
Share on other sites

Hi,

 

You're welcome. However, I do not recommend using ProgJogPos for this.

 

You should create an Encoder Conversion Table (ECT) entry to process your ADC data and then point your slave motor's Motor[x].pMasterEnc to that ECT entry's address.

 

For example, if you use ECT entry 0 for this, you can use

 

Motor[x].pMasterEnc = EncTable[0].a

 

Page 58 of the Power Brick AC manual gives an example of how to set up the ECT for your ADC. It looks like this:

 

Connections and Software Setup 58
Using the ADC for Servo Feedback
Using the ADC data for servo feedback requires bringing it into the Encoder Conversion Table (ECT) into which the motor’s position and velocity elements are assigned to. Example:
EncTable[41].pEnc = PowerBrick[0].Chan[0].AdcAmp[2].a;
EncTable[41].pEnc1 = Sys.pushm;
EncTable[41].index1 = 16;
EncTable[41].index2 = 16;
EncTable[41].index3 = 0;
EncTable[41].index4 = 0;
EncTable[41].index5 = 0;
EncTable[41].ScaleFactor = 1 / EXP2(16);
Motor[9].pEnc = EncTable[41].a;
Motor[9].pEnc2 = EncTable[41].a;

 

If you were using EncTable[41] you would point Motor[x].pMasterEnc=EncTable[41].a, where x is your motor number.

 

Then, to turn on following, set Motor[x].MasterCtrl = 1. The slave motor will follow when closed-loop.

 

I don't have load econder feedback, but only motor encoder (perhaps the image has created some misunderstanding) and with position commands i want move motor. Idea is illustrated in the picture.

 

However, if I have input Position Command that is external Analog Angular Position Commands,

-for Azimuth Antenna position (0V --> 0 degree, 10V ---> 360 degree)

-for Elevation Antenna position (0V ---> 0 degree, 10 V ---> 180 degree)

I use ADC data for servo feedback and then point it to ECT entry.

 

-Setting Motor[x].MasterCtrl = 1 (certainly introducing a gear ratio coefficient from motor to load setted in Motor[x].MasterPosSf) my azimuth/elevation motor follows Analog Position Command?

 

in this way does not require the use of any motion programs!!! Unbelievable!!!!

 

- if all is right this method can be used for external Analog Angular Position Commands (precomputed) and also for manual movement of antenna with Analog Joystick, using analog input of a PMAC as a position master, is correct?

 

But an other thing i don't understand!

 

page 44 of Power Brick Ac manual gives example for quadrature encoders settings

==============================================================

EncTable[1].type = 1; // Single 32-bit read

EncTable[1].pEnc = PowerBrick[0].Chan[0].ServoCapt.a; // Primary source, ch 1 Servo Capture

EncTable[1].pEnc1 = Sys.Pushm; // Secondary source, none

EncTable[1].index1 = 0; // left shift, none

EncTable[1].index2 = 0; // right shift, none

EncTable[1].index3 = 0; //

EncTable[1].index4 = 0; //

EncTable[1].ScaleFactor = 1 / 256; // Scale Factor, LSB location

==============================================================

-I have to do quadrature encoder setting? or for my purpose i have to write only ADC data for servo-position feedback setting in order to use an External Analog Position command ? (Because it doesn't have to execute a motion program with a presetted trajectory, but only follows an external position command)

Link to comment
Share on other sites

Hi,

 

You're welcome. However, I do not recommend using ProgJogPos for this.

 

You should create an Encoder Conversion Table (ECT) entry to process your ADC data and then point your slave motor's Motor[x].pMasterEnc to that ECT entry's address.

 

For example, if you use ECT entry 0 for this, you can use

 

Motor[x].pMasterEnc = EncTable[0].a

 

Page 58 of the Power Brick AC manual gives an example of how to set up the ECT for your ADC. It looks like this:

 

Connections and Software Setup 58
Using the ADC for Servo Feedback
Using the ADC data for servo feedback requires bringing it into the Encoder Conversion Table (ECT) into which the motor’s position and velocity elements are assigned to. Example:
EncTable[41].pEnc = PowerBrick[0].Chan[0].AdcAmp[2].a;
EncTable[41].pEnc1 = Sys.pushm;
EncTable[41].index1 = 16;
EncTable[41].index2 = 16;
EncTable[41].index3 = 0;
EncTable[41].index4 = 0;
EncTable[41].index5 = 0;
EncTable[41].ScaleFactor = 1 / EXP2(16);
Motor[9].pEnc = EncTable[41].a;
Motor[9].pEnc2 = EncTable[41].a;

 

If you were using EncTable[41] you would point Motor[x].pMasterEnc=EncTable[41].a, where x is your motor number.

 

Then, to turn on following, set Motor[x].MasterCtrl = 1. The slave motor will follow when closed-loop.

 

I don't have load econder feedback, but only motor encoder (perhaps the image has created some misunderstanding) and with position commands i want move motor. Idea is illustrated in the picture.

 

However, if I have input Position Command that is external Analog Angular Position Commands,

-for Azimuth Antenna position (0V --> 0 degree, 10V ---> 360 degree)

-for Elevation Antenna position (0V ---> 0 degree, 10 V ---> 180 degree)

I use ADC data for servo feedback and then point it to ECT entry.

 

-Setting Motor[x].MasterCtrl = 1 (certainly introducing a gear ratio coefficient from motor to load setted in Motor[x].MasterPosSf) my azimuth/elevation motor follows Analog Position Command?

 

in this way does not require the use of any motion programs!!! Unbelievable!!!!

 

- if all is right this method can be used for external Analog Angular Position Commands (precomputed) and also for manual movement of antenna with Analog Joystick, using analog input of a PMAC as a position master, is correct?

 

But an other thing i don't understand!

 

page 44 of Power Brick Ac manual gives example for quadrature encoders settings

==============================================================

EncTable[1].type = 1; // Single 32-bit read

EncTable[1].pEnc = PowerBrick[0].Chan[0].ServoCapt.a; // Primary source, ch 1 Servo Capture

EncTable[1].pEnc1 = Sys.Pushm; // Secondary source, none

EncTable[1].index1 = 0; // left shift, none

EncTable[1].index2 = 0; // right shift, none

EncTable[1].index3 = 0; //

EncTable[1].index4 = 0; //

EncTable[1].ScaleFactor = 1 / 256; // Scale Factor, LSB location

==============================================================

-I have to do quadrature encoder setting? or for my purpose i have to write only ADC data for servo-position feedback setting in order to use an External Analog Position command ? (Because it doesn't have to execute a motion program with a presetted trajectory, but only follows an external position command)

Immagine.png.2a5e87a9d2096dda0b63cb3354761f97.png

Link to comment
Share on other sites

Hi,

 

Yes, you can both follow and command a trajectory. The behavior is slightly different whether you set MasterCtrl for "normal" following or "offset" following, so you can check the manual on the pages I listed for the description of the difference.

 

You need BOTH an ECT entry for the ADC input AND for your slave motor's encoder. Your slave motor's servo loop is based on its quadrature encoder, but it uses the master position (from the ADC) as an input to the servo loop.

 

Use the quadrature encoder for your slave motor's feedback and the ADC input for the master position.

 

Does that make sense or did I miss part of your question?

Link to comment
Share on other sites

Hi,

 

Yes, you can both follow and command a trajectory. The behavior is slightly different whether you set MasterCtrl for "normal" following or "offset" following, so you can check the manual on the pages I listed for the description of the difference.

 

You need BOTH an ECT entry for the ADC input AND for your slave motor's encoder. Your slave motor's servo loop is based on its quadrature encoder, but it uses the master position (from the ADC) as an input to the servo loop.

 

Use the quadrature encoder for your slave motor's feedback and the ADC input for the master position.

 

Does that make sense or did I miss part of your question?

Link to comment
Share on other sites

  • 4 weeks later...

Hi,

 

Yes, you can both follow and command a trajectory. The behavior is slightly different whether you set MasterCtrl for "normal" following or "offset" following, so you can check the manual on the pages I listed for the description of the difference.

 

You need BOTH an ECT entry for the ADC input AND for your slave motor's encoder. Your slave motor's servo loop is based on its quadrature encoder, but it uses the master position (from the ADC) as an input to the servo loop.

 

Use the quadrature encoder for your slave motor's feedback and the ADC input for the master position.

 

Does that make sense or did I miss part of your question?

 

Thanks Charles , I understand this part with your help . Forgive me for the delay of my reply.

I have another question.

 

The current sensors of the motor phases for current loop feedback are integrated into the Power Brick AC, or not?

 

thanks in advance for your reply and have a nice Weekend

Link to comment
Share on other sites

Hi,

 

Yes, you can both follow and command a trajectory. The behavior is slightly different whether you set MasterCtrl for "normal" following or "offset" following, so you can check the manual on the pages I listed for the description of the difference.

 

You need BOTH an ECT entry for the ADC input AND for your slave motor's encoder. Your slave motor's servo loop is based on its quadrature encoder, but it uses the master position (from the ADC) as an input to the servo loop.

 

Use the quadrature encoder for your slave motor's feedback and the ADC input for the master position.

 

Does that make sense or did I miss part of your question?

 

Thanks Charles , I understand this part with your help . Forgive me for the delay of my reply.

I have another question.

 

The current sensors of the motor phases for current loop feedback are integrated into the Power Brick AC, or not?

 

thanks in advance for your reply and have a nice Weekend

Link to comment
Share on other sites

Yes, the current sensors are built into the Power Brick AC. You can read them by polling Motor[].IaMeas, and Motor[].IbMeas.

 

Thanks very much Richard!!

 

I 'm trying now to set Position Following mode in "Normal" mode operation (MasterCtrl = 1) in order to follow external analog signal trajectory (My Autotracking mode). I undertand all about this.

 

However I have some problems to understand how to set PMAC in order to use an analog joystick as a position command (My Manual Tracking mode).

It was reccomended to use Position Following in "offset mode" ((MasterCtrl = 3), but how "offset mode" works?

 

I read in PMAC manual that in "offset mode" : "reference position for programmed moves changes along with the following moves. In this mode, subsequent programmed moves are added on top of the position changes due to the following function. This permits the superimposition of programmed and following moves."

 

But my purpose is: When My Manual tracking mode is enable, external analog signal trajectory is disable (My Autotracking mode is disable) and motors moving is commanded only with joystick.

 

Thus, is correct changes from "position following Normal mode" to "position following offset mode" for my purpose??

 

Other questions is: In direct PWM mode i can use joystick as a velocity command as in application note in attachment?(and not as a position command)? If Yes how i have to change in PPMAC configuration?

 

thanks in advance for your reply and Have a Nice Day

Link to comment
Share on other sites

Yes, the current sensors are built into the Power Brick AC. You can read them by polling Motor[].IaMeas, and Motor[].IbMeas.

 

Thanks very much Richard!!

 

I 'm trying now to set Position Following mode in "Normal" mode operation (MasterCtrl = 1) in order to follow external analog signal trajectory (My Autotracking mode). I undertand all about this.

 

However I have some problems to understand how to set PMAC in order to use an analog joystick as a position command (My Manual Tracking mode).

It was reccomended to use Position Following in "offset mode" ((MasterCtrl = 3), but how "offset mode" works?

 

I read in PMAC manual that in "offset mode" : "reference position for programmed moves changes along with the following moves. In this mode, subsequent programmed moves are added on top of the position changes due to the following function. This permits the superimposition of programmed and following moves."

 

But my purpose is: When My Manual tracking mode is enable, external analog signal trajectory is disable (My Autotracking mode is disable) and motors moving is commanded only with joystick.

 

Thus, is correct changes from "position following Normal mode" to "position following offset mode" for my purpose??

 

Other questions is: In direct PWM mode i can use joystick as a velocity command as in application note in attachment?(and not as a position command)? If Yes how i have to change in PPMAC configuration?

 

thanks in advance for your reply and Have a Nice Day

Analog Joystick Application.pdf

Link to comment
Share on other sites

Hi,

 

Yes, you should use "Offset mode" (MasterCtrl=3). The following will work even when you're not commanding a trajectory over the top of it (i.e. when only the joystick is being used). Something to note: regardless of whether MasterCtrl=1 or =3, the resulting motion of the follower motor will not be different; the following mode simply changes how the position of the follower is reported. In "normal" following, the follower's position is always reported relative to an absolute origin (its own motor zero position); in "offset" mode, the position of the follower is relative to the master position (i.e. the follower motor's "base" is effectively subtracted out of the position reported).

 

To do velocity control with the joystick like in the application note you posted, you will use a very similar technique as follows:

 

  1. Using a PLC, put the raw ADC data through a cubic function. The ADC data can be found in the high 16 bits of PowerBrick[0].Chan[0].AdcAmp[2], for example.
  2. Dump the result of the cubic into user buffer memory (e.g. in Sys.Ddata[1]).
  3. Create an encoder conversion table (ECT) entry to integrate the result that's in user buffer.
  4. Use the result of this ECT entry as the new master position of your follower.
  5. If you want to switch between your original position following and this new velocity following, you can redirect Motor[x].pMasterEnc appropriately. Make sure you issue a pmatch command every time you do this.

 

That's the general idea. Is that enough for you or do you need some code examples?

Link to comment
Share on other sites

Hi,

 

Yes, you should use "Offset mode" (MasterCtrl=3). The following will work even when you're not commanding a trajectory over the top of it (i.e. when only the joystick is being used). Something to note: regardless of whether MasterCtrl=1 or =3, the resulting motion of the follower motor will not be different; the following mode simply changes how the position of the follower is reported. In "normal" following, the follower's position is always reported relative to an absolute origin (its own motor zero position); in "offset" mode, the position of the follower is relative to the master position (i.e. the follower motor's "base" is effectively subtracted out of the position reported).

 

To do velocity control with the joystick like in the application note you posted, you will use a very similar technique as follows:

 

  1. Using a PLC, put the raw ADC data through a cubic function. The ADC data can be found in the high 16 bits of PowerBrick[0].Chan[0].AdcAmp[2], for example.
  2. Dump the result of the cubic into user buffer memory (e.g. in Sys.Ddata[1]).
  3. Create an encoder conversion table (ECT) entry to integrate the result that's in user buffer.
  4. Use the result of this ECT entry as the new master position of your follower.
  5. If you want to switch between your original position following and this new velocity following, you can redirect Motor[x].pMasterEnc appropriately. Make sure you issue a pmatch command every time you do this.

 

That's the general idea. Is that enough for you or do you need some code examples?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...