100% Guaranteed Results


15MH403L – Solved
$ 29.99
Category:

Description

5/5 – (1 vote)

Encoders usually have from 100 to 6,000 segments per revolution. This means that these encoders can provide 3.6 deg of resolution for the encoder with 100 segments and 0.06 deg of resolution for the encoder with 6,000 segments. Linear encoders work under the same principle as rotary encoders except that instead of a rotating disk, there is a stationary opaque strip with transparent slits along its surface, and the LED- detector assembly is attached to the moving body.
An encoder with one set of pulses would not be useful because it could not indicate the direction of rotation. Using two code tracks with sectors positioned 90 deg out of phase, the two output channels of the quadrature encoder indicate both position and direction of rotation. If A leads B, for example, the disk is rotating in a clockwise direction. If B leads A, then the disk is rotating in a counter-clockwise direction. Therefore, by monitoring both the number of pulses and the relative phase of signals A and B, you can track both the position and direction of rotation.
In addition, some quadrature encoders include a third output channel โ€“ called a zero or reference signal โ€“ which supplies a single pulse per revolution. You can use this single pulse for precise determination of a reference position. In the majority of encoders, this signal is called the Z-Terminal or the index.
So far, this document has addressed only what are called single-ended incremental quadrature encoders. These are called single-ended because the A and B signals are both referenced to ground, so there is one wire (or end) per signal. Another commonly used type of encoder is a differential encoder, where there are two lines per each A and B signal. The two lines for the A signal are Aโ€™ and A, and the two lines for the B signal are Bโ€™ and B. This type of configuration is also called push-pull because all four lines are always supplying a known voltage (either 0 V of Vcc). When A is Vcc, Aโ€™ is 0 V , and when A is 0 V, Aโ€™ is Vcc. In the case of a single-ended encoder, A is either Vcc or it floats. Differential encoders are often used in electrically noisy environments because taking differential measurements protects the integrity of the signal.
To make encoder measurements, you need a basic electronic component called a counter. Based on its several inputs, a basic counter emits a value that represents the number of edges (low to high transitions in the waveform) counted. Most counters have three relevant inputs โ€“ gate, source, and up/down. The counter counts the events registered in the source input, and, depending on the state of the up/down line, it either increments the count or decrements it. For example, if the up/down line is โ€œhighโ€ the counter increments the count, and if it is โ€œlow,โ€ the counter decrements the count. An encoder usually has five wires that you need to connect to the instrument, and, depending on the encoder, these wires vary in color. You can use these wires to provide power to the encoder and to read in the A, B, and Z signals. Figure 4 shows a typical pinout table for an incremental encoder.

The next step is determining where you should connect each of these wires. Considering the counter described above, signal A is connected to the source terminal, making this the signal from which the pulses are counted. Signal B is connected to the up/down terminal, and you can connect the +5 VDC and ground signals to any power source โ€“ in most cases, a digital line in a data acquisition device card suffices.
Once the edges are counted, the next concept you need to consider is how those values are converted to position. The process by which edge counts are converted to position depends on the type of encoding used. There are three basic types of encoding, X1, X2, and X4.
X1 Decoding
The following figure shows a quadrature cycle and the resulting increments and decrements for X1 decoding. When channel A leads channel B, the increment occurs on the rising edge of channel A. When channel B leads channel A, the decrement occurs on the falling edge of channel A.
UP Count if A.๐‘ฉฬ… otherwise down count

X2 Decoding
The same behavior holds for X2 encoding except the counter increments or decrements on each edge of channel A, depending on which channel leads the other. Each cycle results in two increments or decrements, as shown in figure below.
UP Count if Aโ‰ B
otherwise down count
X4 Decoding
The counter increments or decrements similarly on each edge of channels A and B for X4 decoding. Whether the counter increments or decrements depends on which channel leads the other. Each cycle results in four increments or decrements, as shown in the figure below.
UP Count if
Delayed A==Current B otherwise down count
Physical Parameter Specification
Armature resistance 1 Ohm
Electrical inductance 0.5 H
Torque Constant(K) 0.01 Nm/A (or)
V/(rad/s)
Damping 0.1 Nm/(rad/sec)
Moment of Inertia 0.01 kgยทm2
Ideal torque source (Load) 0.001 Nm
Maximum Voltage 40 V
Once you have set the encoding type and counted the pulses, converting to position is a matter of using one of the following formulas:

For Rotational velocity Calculation

Time for period of last โ€˜Mโ€™ samples= Sampling time period (Ts) *M M-number of samples observed at last portion of total running time.
Ts=1/fs
Where fs is the sampling frequency.
As per Nyquist theorem, sampling frequency (fs) โ‰ฅ2* fm (or) Ts โ‰ค Tm/2

Where, fm Maximum frequency of channel A or B.
Tm-Time period of channel A or B.

Total count โˆ— 2โˆ—pi
Amount of Rotation for โ€˜Mโ€™ samples in radians=
๐‘โˆ—๐‘ฅ
where N = number of pulses generated by the encoder per shaft revolution x = encoding type
(x=1 for X1 decoding; x=2 for X2 decoding; x=4 for X4 encoding)
๐ด๐‘š๐‘œ๐‘ข๐‘›๐‘ก ๐‘œ๐‘“ ๐‘…๐‘œ๐‘ก๐‘Ž๐‘ก๐‘–๐‘œ๐‘› ๐‘œ๐‘“ ๐‘€ ๐‘ ๐‘Ž๐‘š๐‘๐‘™๐‘’๐‘  ๐‘–๐‘› ๐‘Ÿ๐‘Ž๐‘‘
Angular velocity of the motor= rad/sec
๐‘€โˆ—๐‘‡๐‘ 
EXERCISE TASKS
Model of a DC Motor

Model of an Incremental shaft Encoder
Physical Parameter Specification
Pulse voltage 1 V
No. of pulses per revolution(N) 20

Task 1: Angular Velocity in X1 Encoding
โ€ข Develop a Simulink model to obtain the angular velocity of DC motor shaft using the X1 decoding.
โ€ข Use the following logic for decoding o Increment the count on a raising edge of A if A leads B o Decrement the count on a falling edge of A if B leads A
Task 2: Angular Velocity in X2 Encoding
โ€ข Develop a Simulink model to obtain the angular velocity of DC motor shaft using the X2 decoding.
โ€ข Use the following logic for decoding
o On raising or falling edge of A:
๏‚ง Increment if A leads B
๏‚ง Decrement if B leads A
Task 3: Angular Velocity in X4 Encoding

โ€ข Develop a Simulink model to obtain the angular velocity of DC motor shaft using the X4 encoding.
โ€ข Use the following logic for decoding
o On rising or falling edge of A or B
๏‚ง Increment if A leads B
๏‚ง Decrement if B leads A
Task 4: Compare the Angular velocities Obtained

โ€ข Compare the angular velocities obtained using the three different encoding types.

Task 1:

Task 2:

Task 3:

Task 4:
The following readings were noted at no. of samples observed last (M) = 1000

Voltage applied to motor in Volt X1 Encoding Mode X2 Encoding Mode X4 Encoding Mode
Velocity from built in sensor(rad/s) Velocity derived from
decoding(rad/s) Velocity from built in sensor(rad/s) Velocity derived from
decoding(rad/s) Velocity from built in sensor(rad/s) Velocity derived from
decoding(rad/s)
-20 -2.008 -2.011 -2.008 -2.011 -2.008 -2.011
-10 -1.009 -1.005 -1.009 -1.005 -1.009 -1.013
10 0.989 1.005 0.989 0.9896 0.989 0.9896
20 1.988 1.979 1.988 1.995 1.988 1.995

The following readings were noted at motor voltage = 20 V

No. of samples observed last(M) X1 Encoding Mode X2 Encoding Mode X4 Encoding Mode
Velocity from built in sensor(rad/s) Velocity derived from
decoding(rad/s) Velocity from built in sensor(rad/s) Velocity derived from
decoding(rad/s) Velocity from built in sensor(rad/s) Velocity derived from
decoding(rad/s)
100 1.988 1.885 1.988 2.042 1.988 2.042
300 1.988 1.99 1.988 1.99 1.988 1.99
500 1.988 1.948 1.988 1.979 1.988 1.995
700 1.988 1.975 1.988 1.997 1.988 1.997

Motor voltage X1 Encoding Mode X2 Encoding Mode X4 Encoding Mode

-20

-10

10

20
Angular velocity measurements w.r.t. motor voltage:

All these values were recorded by keeping no. of samples observed last (M) = 1000

Motor voltage X1 Encoding Mode X2 Encoding Mode X4 Encoding Mode

100

300

500

700
Angular velocity measurements w.r.t. no. of samples observed last(M):

All these values were noted by keeping motor voltage = 20 V

LAB SESSION SCREENSHOT:

INFERENCE:
โ€ข X1 Decoding: o Count rising edges of channel A. o Up count if ๐ด โˆ™ ๐ตฬ…, else down count.
โ€ข X2 Decoding: o Count rising and falling edges of channel A.
o Up count if ๐ด โ‰  ๐ต, else down count.
โ€ข X4 Decoding: o Count rising and falling edges of channel A and channel B. o Up count if ๐ต๐‘ก = ๐ด๐‘กโˆ’1, else down count.
This experiment gave a deeper understanding about optical incremental shaft encoders, and more importantly, the decoding techniques involved to interpret useful information regarding angular velocity of the motor shaft from a train of voltage pulses for each channel obtained as raw data. The various tasks (Task 1-3) in this exercise helped gain a step by step knowledge about modeling and simulation of the entire system starting with X1 decoding and then proceeding with X2 and X4 decoding techniques with self-exploration. Finally, Task-4 helped gain an insight as to how the three decoding techniques are different in terms of the counting resolution for measuring angular velocity.
From this experiment, it is evident that MATLAB – Simulink is a very powerful tool when it comes to modelling and simulation of dynamic systems. It provides a range of built-in functions and toolboxes for rapid system analysis across multiple representation types (including Simulink as well as Physical System blocks โ€“ it is an important inference that Simulink blocks represent only numerical data whereas Physical System blocks represent a specific physical quantity along with its associated unit/dimension).

Reviews

There are no reviews yet.

Be the first to review “15MH403L – Solved”

Your email address will not be published. Required fields are marked *

Related products