Sign in
Your Position: Home >Generators >Asynchronous Programming with Async and Await - Visual ...

Asynchronous Programming with Async and Await - Visual ...

May. 06, 2024
  • 52
  • 0
  • 0

Asynchronous Programming with Async and Await - Visual ...

If you want to learn more, please visit our website Asynchronous Machines.

Asynchronous programming with Async and Await (Visual Basic)

In this article

You can avoid performance bottlenecks and enhance the overall responsiveness of your application by using asynchronous programming. However, traditional techniques for writing asynchronous applications can be complicated, making them difficult to write, debug, and maintain.

Visual Studio 2012 introduced a simplified approach, async programming, that leverages asynchronous support in the .NET Framework 4.5 and higher as well as in the Windows Runtime. The compiler does the difficult work that the developer used to do, and your application retains a logical structure that resembles synchronous code. As a result, you get all the advantages of asynchronous programming with a fraction of the effort.

This topic provides an overview of when and how to use async programming and includes links to support topics that contain details and examples.

Async improves responsiveness

Asynchrony is essential for activities that are potentially blocking, such as when your application accesses the web. Access to a web resource sometimes is slow or delayed. If such an activity is blocked within a synchronous process, the entire application must wait. In an asynchronous process, the application can continue with other work that doesn't depend on the web resource until the potentially blocking task finishes.

The following table shows typical areas where asynchronous programming improves responsiveness. The listed APIs from the .NET Framework 4.5 and the Windows Runtime contain methods that support async programming.

Asynchrony proves especially valuable for applications that access the UI thread because all UI-related activity usually shares one thread. If any process is blocked in a synchronous application, all are blocked. Your application stops responding, and you might conclude that it has failed when instead it's just waiting.

When you use asynchronous methods, the application continues to respond to the UI. You can resize or minimize a window, for example, or you can close the application if you don't want to wait for it to finish.

The async-based approach adds the equivalent of an automatic transmission to the list of options that you can choose from when designing asynchronous operations. That is, you get all the benefits of traditional asynchronous programming but with much less effort from the developer.

Async methods are easier to write

The Async and Await keywords in Visual Basic are the heart of async programming. By using those two keywords, you can use resources in the .NET Framework or the Windows Runtime to create an asynchronous method almost as easily as you create a synchronous method. Asynchronous methods that you define by using Async and Await are referred to as async methods.

The following example shows an async method. Almost everything in the code should look completely familiar to you. The comments call out the features that you add to create the asynchrony.

You can find a complete Windows Presentation Foundation (WPF) example file at the end of this topic, and you can download the sample from Async Sample: Example from "Asynchronous Programming with Async and Await".

' Three things to note about writing an Async Function:
'  - The function has an Async modifier.
'  - Its return type is Task or Task(Of T). (See "Return Types" section.)
'  - As a matter of convention, its name ends in "Async".
Async Function AccessTheWebAsync() As Task(Of Integer)
    Using client As New HttpClient()
        ' Call and await separately.
        '  - AccessTheWebAsync can do other things while GetStringAsync is also running.
        '  - getStringTask stores the task we get from the call to GetStringAsync.
        '  - Task(Of String) means it is a task which returns a String when it is done.
        Dim getStringTask As Task(Of String) =
            client.GetStringAsync("https://learn.microsoft.com/dotnet")
        ' You can do other work here that doesn't rely on the string from GetStringAsync.
        DoIndependentWork()
        ' The Await operator suspends AccessTheWebAsync.
        '  - AccessTheWebAsync does not continue until getStringTask is complete.
        '  - Meanwhile, control returns to the caller of AccessTheWebAsync.
        '  - Control resumes here when getStringTask is complete.
        '  - The Await operator then retrieves the String result from getStringTask.
        Dim urlContents As String = Await getStringTask
        ' The Return statement specifies an Integer result.
        ' A method which awaits AccessTheWebAsync receives the Length value.
        Return urlContents.Length

    End Using

End Function

If AccessTheWebAsync doesn't have any work that it can do between calling GetStringAsync and awaiting its completion, you can simplify your code by calling and awaiting in the following single statement.

Dim urlContents As String = Await client.GetStringAsync()

The following characteristics summarize what makes the previous example an async method:

  • The method signature includes an Async modifier.

  • The name of an async method, by convention, ends with an "Async" suffix.

  • The return type is one of the following types:

    • Task(Of TResult) if your method has a return statement in which the operand has type TResult.
    • Task if your method has no return statement or has a return statement with no operand.
    • Sub if you're writing an async event handler.

    For more information, see "Return Types and Parameters" later in this topic.

  • The method usually includes at least one await expression, which marks a point where the method can't continue until the awaited asynchronous operation is complete. In the meantime, the method is suspended, and control returns to the method's caller. The next section of this topic illustrates what happens at the suspension point.

In async methods, you use the provided keywords and types to indicate what you want to do, and the compiler does the rest, including keeping track of what must happen when control returns to an await point in a suspended method. Some routine processes, such as loops and exception handling, can be difficult to handle in traditional asynchronous code. In an async method, you write these elements much as you would in a synchronous solution, and the problem is solved.

For more information about asynchrony in previous versions of the .NET Framework, see TPL and Traditional .NET Framework Asynchronous Programming.

What happens in an Async method

The most important thing to understand in asynchronous programming is how the control flow moves from method to method. The following diagram leads you through the process:

The numbers in the diagram correspond to the following steps:

  1. An event handler calls and awaits the AccessTheWebAsync async method.

  2. AccessTheWebAsync creates an HttpClient instance and calls the GetStringAsync asynchronous method to download the contents of a website as a string.

  3. Something happens in GetStringAsync that suspends its progress. Perhaps it must wait for a website to download or some other blocking activity. To avoid blocking resources, GetStringAsync yields control to its caller, AccessTheWebAsync.

    GetStringAsync returns a Task(Of TResult) where TResult is a string, and AccessTheWebAsync assigns the task to the getStringTask variable. The task represents the ongoing process for the call to GetStringAsync, with a commitment to produce an actual string value when the work is complete.

  4. Because getStringTask hasn't been awaited yet, AccessTheWebAsync can continue with other work that doesn't depend on the final result from GetStringAsync. That work is represented by a call to the synchronous method DoIndependentWork.

  5. DoIndependentWork is a synchronous method that does its work and returns to its caller.

  6. AccessTheWebAsync has run out of work that it can do without a result from getStringTask. AccessTheWebAsync next wants to calculate and return the length of the downloaded string, but the method can't calculate that value until the method has the string.

    Therefore, AccessTheWebAsync uses an await operator to suspend its progress and to yield control to the method that called AccessTheWebAsync. AccessTheWebAsync returns a Task(Of Integer) to the caller. The task represents a promise to produce an integer result that's the length of the downloaded string.

    Note

    If GetStringAsync (and therefore getStringTask) is complete before AccessTheWebAsync awaits it, control remains in AccessTheWebAsync. The expense of suspending and then returning to AccessTheWebAsync would be wasted if the called asynchronous process (getStringTask) has already completed and AccessTheWebSync doesn't have to wait for the final result.

    Inside the caller (the event handler in this example), the processing pattern continues. The caller might do other work that doesn't depend on the result from AccessTheWebAsync before awaiting that result, or the caller might await immediately. The event handler is waiting for AccessTheWebAsync, and AccessTheWebAsync is waiting for GetStringAsync.

  7. GetStringAsync completes and produces a string result. The string result isn't returned by the call to GetStringAsync in the way that you might expect. (Remember that the method already returned a task in step 3.) Instead, the string result is stored in the task that represents the completion of the method, getStringTask. The await operator retrieves the result from getStringTask. The assignment statement assigns the retrieved result to urlContents.

  8. When AccessTheWebAsync has the string result, the method can calculate the length of the string. Then the work of AccessTheWebAsync is also complete, and the waiting event handler can resume. In the full example at the end of the topic, you can confirm that the event handler retrieves and prints the value of the length result.

If you are new to asynchronous programming, take a minute to consider the difference between synchronous and asynchronous behavior. A synchronous method returns when its work is complete (step 5), but an async method returns a task value when its work is suspended (steps 3 and 6). When the async method eventually completes its work, the task is marked as completed and the result, if any, is stored in the task.

For more information about control flow, see Control Flow in Async Programs (Visual Basic).

API Async Methods

You might be wondering where to find methods such as GetStringAsync that support async programming. The .NET Framework 4.5 or higher contains many members that work with Async and Await. You can recognize these members by the "Async" suffix that's attached to the member name and a return type of Task or Task(Of TResult). For example, the System.IO.Stream class contains methods such as CopyToAsync, ReadAsync, and WriteAsync alongside the synchronous methods CopyTo, Read, and Write.

The Windows Runtime also contains many methods that you can use with Async and Await in Windows apps. For more information and example methods, see Call asynchronous APIs in C# or Visual Basic, Asynchronous programming (Windows Runtime apps), and WhenAny: Bridging between the .NET Framework and the Windows Runtime.

Threads

Async methods are intended to be non-blocking operations. An Await expression in an async method doesn't block the current thread while the awaited task is running. Instead, the expression signs up the rest of the method as a continuation and returns control to the caller of the async method.

The Async and Await keywords don't cause additional threads to be created. Async methods don't require multi-threading because an async method doesn't run on its own thread. The method runs on the current synchronization context and uses time on the thread only when the method is active. You can use Task.Run to move CPU-bound work to a background thread, but a background thread doesn't help with a process that's just waiting for results to become available.

The async-based approach to asynchronous programming is preferable to existing approaches in almost every case. In particular, this approach is better than BackgroundWorker for I/O-bound operations because the code is simpler and you don't have to guard against race conditions. In combination with Task.Run, async programming is better than BackgroundWorker for CPU-bound operations because async programming separates the coordination details of running your code from the work that Task.Run transfers to the threadpool.

Async and Await

If you specify that a method is an async method by using an Async modifier, you enable the following two capabilities.

  • The marked async method can use Await to designate suspension points. The await operator tells the compiler that the async method can't continue past that point until the awaited asynchronous process is complete. In the meantime, control returns to the caller of the async method.

    The suspension of an async method at an Await expression doesn't constitute an exit from the method, and Finally blocks don't run.

  • The marked async method can itself be awaited by methods that call it.

An async method typically contains one or more occurrences of an Await operator, but the absence of Await expressions doesn't cause a compiler error. If an async method doesn't use an Await operator to mark a suspension point, the method executes as a synchronous method does, despite the Async modifier. The compiler issues a warning for such methods.

Async and Await are contextual keywords. For more information and examples, see the following topics:

Return types and parameters

In .NET Framework programming, an async method typically returns a Task or a Task(Of TResult). Inside an async method, an Await operator is applied to a task that's returned from a call to another async method.

You specify Task(Of TResult) as the return type if the method contains a Return statement that specifies an operand of type TResult.

You use Task as the return type if the method has no return statement or has a return statement that doesn't return an operand.

The following example shows how you declare and call a method that returns a Task(Of TResult) or a Task:

' Signature specifies Task(Of Integer)
Async Function TaskOfTResult_MethodAsync() As Task(Of Integer)

    Dim hours As Integer
    ' . . .
    ' Return statement specifies an integer result.
    Return hours
End Function

' Calls to TaskOfTResult_MethodAsync
Dim returnedTaskTResult As Task(Of Integer) = TaskOfTResult_MethodAsync()
Dim intResult As Integer = Await returnedTaskTResult
' or, in a single statement
Dim intResult As Integer = Await TaskOfTResult_MethodAsync()

' Signature specifies Task
Async Function Task_MethodAsync() As Task

    ' . . .
    ' The method has no return statement.
End Function

' Calls to Task_MethodAsync
Task returnedTask = Task_MethodAsync()
Await returnedTask
' or, in a single statement
Await Task_MethodAsync()

Each returned task represents ongoing work. A task encapsulates information about the state of the asynchronous process and, eventually, either the final result from the process or the exception that the process raises if it doesn't succeed.

An async method can also be a Sub method. This return type is used primarily to define event handlers, where a return type is required. Async event handlers often serve as the starting point for async programs.

An async method that's a Sub procedure can't be awaited, and the caller can't catch any exceptions that the method throws.

An async method can't declare ByRef parameters, but the method can call methods that have such parameters.

For more information and examples, see Async Return Types (Visual Basic). For more information about how to catch exceptions in async methods, see Try...Catch...Finally Statement.

Asynchronous APIs in Windows Runtime programming have one of the following return types, which are similar to tasks:

For more information and an example, see Call asynchronous APIs in C# or Visual Basic.

Naming convention

By convention, you append "Async" to the names of methods that have an Async modifier.

You can ignore the convention where an event, base class, or interface contract suggests a different name. For example, you shouldn't rename common event handlers, such as Button1_Click.

Related topics and samples (Visual Studio)

Complete Example

The following code is the MainWindow.xaml.vb file from the Windows Presentation Foundation (WPF) application that this topic discusses. You can download the sample from Async Sample: Example from "Asynchronous Programming with Async and Await".


Imports System.Net.Http

' Example that demonstrates Asynchronous Programming with Async and Await.
' It uses HttpClient.GetStringAsync to download the contents of a website.
' Sample Output:
' Working . . . . . . .
'
' Length of the downloaded string: 39678.

Class MainWindow

    ' Mark the event handler with Async so you can use Await in it.
    Private Async Sub StartButton_Click(sender As Object, e As RoutedEventArgs)

        ' Call and await immediately.
        ' StartButton_Click suspends until AccessTheWebAsync is done.
        Dim contentLength As Integer = Await AccessTheWebAsync()

        ResultsTextBox.Text &= $"{vbCrLf}Length of the downloaded string: {contentLength}.{vbCrLf}"

    End Sub


    ' Three things to note about writing an Async Function:
    '  - The function has an Async modifier.
    '  - Its return type is Task or Task(Of T). (See "Return Types" section.)
    '  - As a matter of convention, its name ends in "Async".
    Async Function AccessTheWebAsync() As Task(Of Integer)

        Using client As New HttpClient()

            ' Call and await separately.
            '  - AccessTheWebAsync can do other things while GetStringAsync is also running.
            '  - getStringTask stores the task we get from the call to GetStringAsync.
            '  - Task(Of String) means it is a task which returns a String when it is done.
            Dim getStringTask As Task(Of String) =
                client.GetStringAsync("https://learn.microsoft.com/dotnet")

            ' You can do other work here that doesn't rely on the string from GetStringAsync.
            DoIndependentWork()

            ' The Await operator suspends AccessTheWebAsync.
            '  - AccessTheWebAsync does not continue until getStringTask is complete.
            '  - Meanwhile, control returns to the caller of AccessTheWebAsync.
            '  - Control resumes here when getStringTask is complete.
            '  - The Await operator then retrieves the String result from getStringTask.
            Dim urlContents As String = Await getStringTask

            ' The Return statement specifies an Integer result.
            ' A method which awaits AccessTheWebAsync receives the Length value.
            Return urlContents.Length

        End Using

    End Function

    Sub DoIndependentWork()
        ResultsTextBox.Text &= $"Working . . . . . . .{vbCrLf}"
    End Sub

End Class

See also

MOTOR CHARACTERISTICS – Applied Industrial Electricity

5

MOTOR CHARACTERISTICS

5.1 Introduction

After the introduction of the DC electrical distribution system by Edison in the United States, a gradual transition to the more economical AC system commenced. The lighting worked as well on AC as on DC. Transmission of electrical energy covered longer distances at a lower loss with alternating current. However, motors were a problem with alternating current. Initially, AC motors were constructed like DC motors, but numerous problems were encountered due to changing magnetic fields.

 

Charles P. Steinmetz contributed to solving these problems with his investigation of hysteresis losses in iron armatures. Nikola Tesla envisioned an entirely new type of motor when he visualized a spinning turbine, not spun by water or steam, but by a rotating magnetic field. His new type of motor, the AC induction motor, is the workhorse of the industry to this day. Its ruggedness and simplicity make for long life, high reliability, and low maintenance. Yet small brushed AC motors, similar to the DC variety, persist in small appliances along with small Tesla induction motors. Above one horsepower (750 W), the Tesla motor reigns supreme.

Modern solid-state electronic circuits drive brushless DC motors with AC waveforms generated from a DC source. The brushless DC motor, actually an AC motor, is replacing the conventional brushed DC motor in many applications. And, the stepper motor, a digital version of the motor, is driven by alternating current square waves, again, generated by solid-state circuitry. The figure above shows the family tree of the AC motors described in this chapter.

Cruise ships and other large vessels replace reduction geared driveshafts with large multi-megawatt generators and motors. Such has been the case with diesel-electric locomotives on a smaller scale for many years.

 

 

At the system level, (Figure above) a motor takes in electrical energy in terms of a potential difference and a current flow, converting it to mechanical work. Unfortunately, electric motors are not 100% efficient. Some of the electric energy is lost to heat, another form of energy, due to I2R losses (also called copper losses) in the motor windings. The heat is an undesired byproduct of this conversion. It must be removed from the motor and may adversely affect longevity. Thus, one goal is to maximize motor efficiency, reducing heat loss. AC motors also have some losses not encountered by DC motors: hysteresis and eddy currents.

5.2  Tesla Polyphase Induction Motors

Most AC motors are induction motors. Induction motors are favored due to their ruggedness and simplicity. In fact, 90% of industrial motors are induction motors.

Nikola Tesla conceived the basic principles of the polyphase induction motor in 1883 and had a half horsepower (400 watts) model by 1888. Tesla sold the manufacturing rights to George Westinghouse for $65,000.Most large ( > 1 hp or 1 kW) industrial motors are polyphase induction motors. By polyphase, we mean that the stator contains multiple distinct windings per motor pole, driven by corresponding time-shifted sine waves. In practice, this is two or three phases. Large industrial motors are 3-phase. While we include numerous illustrations of two-phase motors for simplicity, we must emphasize that nearly all polyphase motors are three-phase. By induction motor, we mean that the stator windings induce a current flow in the rotor conductors, like a transformer, unlike a brushed DC commutator motor.

AC Induction Motor Construction

An induction motor is composed of a rotor, known as an armature, and a stator containing windings connected to a polyphase energy source as shown in the figure below. The simple 2-phase induction motor below is similar to the 1/2 horsepower motor which Nikola Tesla introduced in 1888.

The stator in the figure above is wound with pairs of coils corresponding to the phases of electrical energy available. The 2-phase induction motor stator above has 2-pairs of coils, one pair for each of the two phases of AC. The individual coils of a pair are connected in series and correspond to the opposite poles of an electromagnet. That is, one coil corresponds to an N-pole, the other to an S-pole until the phase of AC changes polarity. The other pair of coils is oriented 90° in space to the first pair. This pair of coils is connected to AC shifted in time by 90° in the case of a 2-phase motor. In Tesla’s time, the source of the two phases of AC was a 2-phase alternator. The stator in the figure above has salient, obvious protruding poles, as used on Tesla’s early induction motor. This design is used to this day for sub-fractional horsepower motors (<50 watts). However, for larger motors, less torque pulsation and higher efficiency results if the coils are embedded into slots cut into the stator laminations (figure below).

 

 

The stator laminations are thin insulated rings with slots punched from sheets of electrical grade steel. A stack of these is secured by end screws, which may also hold the end housings.

 

 

In the figure above, the windings for both a two-phase motor and a three-phase motor have been installed in the stator slots. The coils are wound on an external fixture, then worked into the slots. Insulation wedged between the coil periphery and the slot protects against abrasion.Actual stator windings are more complex than the single windings per pole in the figure above. Comparing the 2-φ motor to Tesla’s 2-φ motor with salient poles, the number of coils is the same. In actual large motors, a pole winding is divided into identical coils inserted into many smaller slots than above. This group is called a phase belt (see the figure below). The distributed coils of the phase belt cancel some of the odd harmonics, producing a more sinusoidal magnetic field distribution across the pole. This is shown in the synchronous motor section. The slots at the edge of the pole may have fewer turns than the other slots. Edge slots may contain windings from two phases. That is, the phase belts overlap.

 

 

The key to the popularity of the AC induction motor is its simplicity as evidenced by the simple rotor (figure below). The rotor consists of a shaft, a steel laminated rotor, and an embedded copper or aluminum squirrel cage, shown at (b) removed from the rotor. As compared to a DC motor armature, there is no commutator. This eliminates the brushes, arcing, sparking, graphite dust, brush adjustment and replacement, and re-machining of the commutator.

 

 

The squirrel cage conductors may be skewed, twisted, with respect to the shaft. The misalignment with the stator slots reduces torque pulsations.Both rotor and stator cores are composed of a stack of insulated laminations. The laminations are coated with insulating oxide or varnish to minimize eddy current losses. The alloy used in the laminations is selected for low hysteresis losses.

Theory of Operation of Induction Motors

A short explanation of operation is that the stator creates a rotating magnetic field which drags the rotor around.The theory of operation of induction motors is based on a rotating magnetic field. One way of creating a rotating magnetic field is to rotate a permanent magnet. If the moving magnetic lines of flux cut a conductive disk, it will follow the motion of the magnet. The lines of flux cutting the conductor will induce a voltage, and consequent current flow, in the conductive disk. This current flow creates an electromagnet whose polarity opposes the motion of the permanent magnet– Lenz’s Law. The polarity of the electromagnet is such that it pulls against the permanent magnet. The disk follows with a little less speed than the permanent magnet.

Rotating magnetic field produces torque in conductive disk

The torque developed by the disk is proportional to the number of flux lines cutting the disk and the rate at which it cuts the disk. If the disk were to spin at the same rate as the permanent magnet, there would be no flux cutting the disk, no induced current flow, no electromagnet field, no torque. Thus, the disk speed will always fall behind that of the rotating permanent magnet, so that lines of flux cut the disk induce a current, create an electromagnetic field in the disk, which follows the permanent magnet. If a load is applied to the disk, slowing it, more torque will be developed as more lines of flux cut the disk. Torque is proportional to slip, the degree to which the disk falls behind the rotating magnet. More slip corresponds to more flux cutting the conductive disk, developing more torque.An analog automotive eddy-current speedometer is based on the principle illustrated above. With the disk restrained by a spring, disk and needle deflection is proportional to the magnet rotation rate.A rotating magnetic field is created by two coils placed at right angles to each other, driven by currents which are 90° out of phase. This should not be surprising if you are familiar with oscilloscope Lissajous patterns.

The company is the world’s best Why Slip Ring Is Used in Induction Motor supplier. We are your one-stop shop for all needs. Our staff are highly-specialized and will help you find the product you need.

 

 

Out of phase (90°), sine waves produce circular Lissajous patternIn the figure above, a circular Lissajous is produced by driving the horizontal and vertical oscilloscope inputs with 90° out of phase sine waves. Starting at (a) with maximum “X” and minimum “Y” deflection, the trace moves up and left toward (b). Between (a) and (b) the two waveforms are equal to 0.707 Vpk at 45°. This point (0.707, 0.707) falls on the radius of the circle between (a) and (b) The trace moves to (b) with minimum “X” and maximum “Y” deflection. With maximum negative “X” and minimum “Y” deflection, the trace moves to (c). Then with minimum “X” and maximum negative “Y”, it moves to (d), and on back to (a), completing one cycle.

 

 

The figure shows the two 90° phase-shifted sine waves applied to oscilloscope deflection plates which are at right angles in space. The combination of 90° phased sine waves and right angle deflection, results in a two-dimensional pattern– a circle. This circle is traced out by a counterclockwise-rotating electron beam.

Full Motor Speed and Synchronous Motor Speed

The rotation rate of a stator rotating magnetic field is related to the number of pole pairs per stator phase. The “full speed” figure below has a total of six poles or three pole-pairs and three phases. However, there is but one pole pair per phase. The magnetic field will rotate once per sine wave cycle. In the case of 60 Hz power, the field rotates at 60 times per second or 3600 revolutions per minute (rpm). For 50 Hz power, it rotates at 50 rotations per second or 3000 rpm. The 3600 and 3000 rpm, are the synchronous speed of the motor. Though the rotor of an induction motor never achieves this speed, it certainly is an upper limit. If we double the number of motor poles, the synchronous speed is cut in half because the magnetic field rotates 180° in space for 360° of the electrical sine wave.

 

 

The synchronous speed is given by:

[latex]N_s = \frac{120 \cdot f}{P}[/latex]

 

Where:

Ns = Magnetic field speed (RPM)

f = frequency of applied power (Hz)

P = total number of poles per phase, a multiple of 2

Example 5.1

The “half speed” figure above has four poles per phase (3-phase). The synchronous speed for 50 Hz power is: S = 120·50/4 = 1500 rpm

The short explanation of the induction motor is that the rotating magnetic field produced by the stator drags the rotor around with it.The longer more correct explanation is that the stator’s magnetic field induces an alternating current into the rotor squirrel cage conductors which constitutes a transformer secondary. This induced rotor current, in turn, creates a magnetic field. The rotating stator magnetic field interacts with this rotor field. The rotor field attempts to align with the rotating stator field. The result is the rotation of the squirrel cage rotor. If there were no mechanical motor torque load, no bearing, windage, or other losses, the rotor would rotate at the synchronous speed. However, the slip between the rotor and the synchronous speed stator field develops torque. It is the magnetic flux cutting the rotor conductors as it slips which develops torque. Thus, a loaded motor will slip in proportion to the mechanical load. If the rotor were to run at synchronous speed, there would be no stator flux cutting the rotor, no current induced in the rotor, no torque.

Torque in Induction Motors

When power is first applied to the motor, the rotor is at rest, while the stator magnetic field rotates at the synchronous speed Ns. The stator field is cutting the rotor at the synchronous speed Ns. The current induced in the rotor shorted turns is maximum, as is the frequency of the current, the line frequency. As the rotor speeds up, the rate at which stator flux cuts the rotor is the difference between synchronous speed Ns and actual rotor speed N, or (Ns – N). The ratio of actual flux cutting the rotor to synchronous speed is defined as slip:

 

[latex]s = \frac{(N_s - N)}{N_s}[/latex]

Where:

Ns = synchronous speed

N = rotor speed

 

The frequency of the current induced into the rotor conductors is only as high as the line frequency at the motor start, decreasing as the rotor approaches synchronous speed. Rotor frequency is given by:

[latex]f_r = s \cdot f[/latex]

Where:

s = slip,

f = stator power line frequency

 

Example 5.2

Slip at 100% torque is typically 5% or less in induction motors. Thus for f = 50 Hz line frequency, the frequency of the induced current in the rotor:

fr = S(f )
= 0.05 (50Hz)
= 2.5 Hz.

Why is it so low? The stator magnetic field rotates at 50 Hz. The rotor speed is 5% less. The rotating magnetic field is only cutting the rotor at 2.5 Hz. The 2.5 Hz is the difference between the synchronous speed and the actual rotor speed. If the rotor spins a little faster, at the synchronous speed, no flux will cut the rotor at all, fr = 0.

 

 

The above graph shows that starting torque known as locked rotor torque (TLR) is higher than 100% of the full load torque (TFL), the safe continuous torque rating. The locked rotor torque is about 175% of TFL for the example motor graphed above. Starting current known as locked rotor current (ILR) is 500% of full load current (IFL), the safe running current. The current is high because this is analogous to a shorted secondary on a transformer. As the rotor starts to rotate the torque may decrease a bit for certain classes of motors to a value known as the pull-up torque. This is the lowest value of torque ever encountered by the starting motor. As the rotor gains 80% of synchronous speed, torque increases from 175% up to 300% of the full load torque. This breakdown torque (TBD) is due to the larger than normal 20% slip. The current has decreased only slightly at this point but will decrease rapidly beyond this point. As the rotor accelerates to within a few percents of synchronous speed, both torque and current will decrease substantially. Slip will be only a few percents during normal operation. For a running motor, any portion of the torque curve below 100% rated torque is normal. The motor load determines the operating point on the torque curve. While the motor torque and current may exceed 100% for a few seconds during starting, continuous operation above 100% can damage the motor. Any motor torque load above the breakdown torque will stall the motor. The torque, slip, and current will approach zero for a “no mechanical torque” load condition. This condition is analogous to an open secondary transformer. There are several basic induction motor designs showing considerable variation from the torque curve above. The different designs are optimized for starting and running different types of loads. The locked rotor torque (TLR) for various motor designs and sizes ranges from 60% to 350% of full load torque (TFL). Starting current or locked rotor current (ILR) can range from 500% to 1400% of full load current (IFL). This current draw can present a starting problem for large induction motors.

NEMA and IEC Motor Classes

Various standard classes (or designs) for motors, corresponding to the torque curves (figure below) have been developed to better drive various type loads. The National Electrical Manufacturers Association (NEMA) has specified motor classes A, B, C, and D to meet these drive requirements. Similar International Electrotechnical Commission (IEC) classes N and H correspond to NEMA B and C designs respectively.

 

Characteristics for NEMA designs

All motors, except class D, operate at 5% slip or less at full load.

  • Class B (IEC Class N) motors are the default motor to use in most applications. With a starting torque of LRT = 150% to 170% of FLT, it can start most loads, without excessive starting current (LRT). Efficiency and power factor are high. It typically drives pumps, fans, and machine tools.
  • Class A starting torque is the same as class B. Drop out torque and starting current (LRT) is higher. This motor handles transient overloads as encountered in injection molding machines.
  • Class C (IEC Class H) has higher starting torque than class A and B at LRT = 200% of FLT. This motor is applied to hard-starting loads which need to be driven at constant speed like conveyors, crushers, and reciprocating pumps and compressors.
  • Class D motors have the highest starting torque (LRT) coupled with low starting current due to high slip ( 5% to 13% at FLT). The high slip results in lower speed. The speed regulation is poor. However, the motor excels at driving highly variable speed loads like those requiring an energy storage flywheel. Applications include punch presses, shears, and elevators.
  • Class E motors are a higher efficiency version of class B.
  • Class F motors have much lower LRC, LRT, and break down torque than class B. They drive constant, easily started loads.

Power Factor in Induction Motors

Induction motors present a lagging (inductive) power factor to the power line. The power factor in large fully loaded high-speed motors can be as favorable as 90% for large high-speed motors. At 3/4 full load, the largest high-speed motor power factor can be 92%. The power factor for small low-speed motors can be as low as 50%. At starting, the power factor can be in the range of 10% to 25%, rising as the rotor achieves speed.Power factor (PF) varies considerably with the motor mechanical load (figure below). An unloaded motor is analogous to a transformer with no resistive load on the secondary. Little resistance is reflected from the secondary (rotor) to the primary (stator). Thus the power line sees a reactive load, as low as 10% PF. As the rotor is loaded an increasing resistive component is reflected from the rotor to stator, increasing the power factor.

 

Efficiency in Induction Motors

Large three-phase motors are more efficient than smaller 3-phase motors, and most all single-phase motors. Large induction motor efficiency can be as high as 95% at full load, though 90% is more common. Efficiency for a lightly loaded or no-loaded induction motor is poor because most of the current is involved with maintaining the magnetizing flux. As the torque load is increased, more current is consumed in generating torque, while current associated with magnetizing remains fixed. Efficiency at 75% FLT can be slightly higher than that at 100% FLT. Efficiency is decreased a few percents at 50% FLT and decreased a few more percents at 25% FLT. Efficiency only becomes poor below 25% FLT. The variation of efficiency with loading is shown in the figure above.Induction motors are typically oversized to guarantee that their mechanical load can be started and driven under all operating conditions. If a polyphase motor is loaded at less than 75% of rated torque where efficiency peaks, efficiency suffers only slightly down to 25% FLT.

Nola Power Factor Corrector

Frank Nola of NASA proposed a power factor corrector (PFC) as an energy-saving device for single-phase induction motors in the late 1970s. It is based on the premise that a less than fully loaded induction motor is less efficient and has a lower power factor than a fully-loaded motor. Thus, there is energy to be saved in partially loaded motors, 1-φ motors in particular. The energy consumed in maintaining the stator magnetic field is relatively fixed with respect to load changes. While there is nothing to be saved in a fully-loaded motor, the voltage to a partially loaded motor may be reduced to decrease the energy required to maintain the magnetic field. This will increase the power factor and efficiency. This was a good concept for the notoriously inefficient single phase motors for which it was intended.This concept is not very applicable to large 3-phase motors. Because of their high efficiency (90%+), there is not much energy to be saved. Moreover, a 95% efficient motor is still 94% efficient at 50% full load torque (FLT) and 90% efficient at 25% FLT. The potential energy savings in going from 100% FLT to 25% FLT is the difference in efficiency 95% – 90% = 5%. This is not 5% of the full load wattage but 5% of the wattage at the reduced load. The Nola power factor corrector might be applicable to a 3-phase motor which idles most of the time (below 25% FLT), like a punch press. The payback period for the expensive electronic controller has been estimated to be unattractive for most applications. Though, it might be economical as part of an electronic motor starter or speed Control.An induction motor may function as an alternator if it is drive

Induction Motors as Alternators

An induction motor may function as an alternator if it is driven by a torque at greater than 100% of the synchronous speed (figure below). This corresponds to a few % of “negative” slip, say -1% slip. This means that as we are rotating the motor faster than the synchronous speed, the rotor is advancing 1% faster than the stator rotating magnetic field. It normally lags by 1% in a motor. Since the rotor is cutting the stator magnetic field in the opposite direction (leading), the rotor induces a voltage into the stator feeding electrical energy back into the power line.

 

 

Such an induction generator must be excited by a “live” source of 50 or 60 Hz power. No power can be generated in the event of a power company power failure. This type of alternator appears to be unsuited as a standby power source. As an auxiliary power wind turbine generator, it has the advantage of not requiring an automatic power failure disconnect switch to protect repair crews. It is fail-safe.

Small remote (from the power grid) installations may be made self-exciting by placing capacitors in parallel with the stator phases. If the load is removed residual magnetism may generate a small amount of current flow. This current is allowed to flow by the capacitors without dissipating power. As the generator is brought up to full speed, the current flow increases to supply a magnetizing current to the stator. The load may be applied at this point. Voltage regulation is poor. An induction motor may be converted to a self-excited generator by the addition of capacitors.

Startup procedure is to bring the wind turbine up to speed in motor mode by application of normal power line voltage to the stator. Any wind-induced turbine speed in excess of synchronous speed will develop negative torque, feeding power back into the power line, reversing the normal direction of the electric kilowatt-hour meter. Whereas an induction motor presents a lagging power factor to the power line, an induction alternator presents a leading power factor. Induction generators are not widely used in conventional power plants. The speed of the steam turbine drive is steady and controllable as required by synchronous alternators. Synchronous alternators are also more efficient.

The speed of a wind turbine is difficult to control and subject to wind speed variation by gusts. An induction alternator is better able to cope with these variations due to the inherent slip. This stresses the gear train and mechanical components less than a synchronous generator. However, this allowable speed variation only amounts to about 1%. Thus, a direct line connected induction generator is considered to be fixed-speed in a wind turbine (See Doubly-fed induction generator for a true variable speed alternator). Multiple generators or multiple windings on a common shaft may be switched to provide a high and low speed to accommodate variable wind conditions.

 

Induction Motors with Multiple Fields

Induction motors may contain multiple field windings, for example, a 4-pole and an 8-pole winding corresponding to 1800 and 900 rpm synchronous speeds. Energizing one field or the other is less complex than rewiring the stator coils.

 

 

If the field is segmented with leads brought out, it may be rewired (or switched) from 4-pole to 2-pole as shown above for a 2-phase motor. The 22.5° segments are switchable to 45° segments. Only the wiring for one phase is shown above for clarity. Thus, our induction motor may run at multiple speeds. When switching the above 60 Hz motor from 4 poles to 2 poles the synchronous speed increases from 1800 rpm to 3600 rpm.

 

Example 5.3

Q: If the motor is driven by 50 Hz, what would be the corresponding 4-pole and 2-pole synchronous speeds?

A: 

[latex]N_s = \frac{120f}{P}[/latex]  [latex]N_s = \frac{120*50Hz}{4}[/latex]  [latex]= 1500 rpm(4-pole)[/latex]

[latex]N_s = \frac{120f}{P}[/latex]  [latex]N_s = \frac{120*50Hz}{2}[/latex][latex]= 3000 rpm (2-pole)[/latex]

 

Induction Motors with Variable Voltage

The speed of small squirrel cage induction motors for applications such as driving fans may be changed by reducing the line voltage. This reduces the torque available to the load which reduces the speed (see figure below).

Electronic Speed Control in Induction Motors

Modern solid-state electronics increase the options for speed control. By changing the 50 or 60 Hz line frequency to higher or lower values, the synchronous speed of the motor may be changed. However, decreasing the frequency of the current fed to the motor also decreases reactance XL which increases the stator current. This may cause the stator magnetic circuit to saturate with disastrous results. In practice, the voltage to the motor needs to be decreased when the frequency is decreased.

 

 

Conversely, the drive frequency may be increased to increase the synchronous speed of the motor. However, the voltage needs to be increased to overcome increasing reactance to keep current up to a normal value and maintain torque. The inverter approximates sine waves to the motor with pulse width modulation outputs. This is a chopped waveform which is either on or off, high or low, the percentage of “on” time corresponds to the instantaneous sine wave voltage.

Once electronics is applied to induction motor control, many control methods are available, varying from the simple to complex:

  • Scalar Control: Low-cost method described above to control only voltage and frequency, without feedback.
  • Vector Control: Also known as a vector phase control. The flux and torque producing components of stator current are measured or estimated on a real-time basis to enhance the motor torque-speed curve. This is computation intensive.
  • Direct Torque Control: An elaborate adaptive motor model allows more direct control of flux and torque without feedback. This method quickly responds to load changes.

 

Review
  • A polyphase induction motor consists of a polyphase winding embedded in a laminated stator and a conductive squirrel-cage embedded in a laminated rotor.
  • Three-phase currents flowing within the stator create a rotating magnetic field which induces a current and consequent magnetic field in the rotor. Rotor torque is developed as the rotor slips a little behind the rotating stator field.
  • Unlike single-phase motors, polyphase induction motors are self-starting.
  • Motor starters minimize loading of the power line while providing a larger starting torque than required during running. Line current reducing starters are only required for large motors.
  • Three-phase motors will run on single phase if started.
  • A static phase converter is a three-phase motor running on single phase having no shaft load, generating a 3-phase output.
  • Multiple field windings can be rewired for multiple discrete motor speeds by changing the number of poles.

 

5.3 Single-phase Induction Motors

A three-phase motor may be run from a single-phase power source. However, it will not self-start. It may be hand started in either direction, coming up to speed in a few seconds. It will only develop 2/3 of the 3-φ power rating because one winding is not used.

Single Coil of a Single Phase Motor

The single coil of a single-phase induction motor does not produce a rotating magnetic field, but a pulsating field reaching maximum intensity at 0° and 180° electrical.

 

Another view is that the single-coil excited by a single-phase current produces two counter-rotating magnetic field phasors, coinciding twice per revolution at 0° (Figure above-a) and 180° (figure e). When the phasors rotate to 90° and -90° they cancel in figure c. At 45° and -45° (figure b) they are partially additive along the +x axis and cancel along the y-axis. An analogous situation exists in figure d. The sum of these two phasors is a phasor stationary in space, but alternating polarity in time. Thus, no starting torque is developed.

However, if the rotor is rotated forward at a bit less than the synchronous speed, It will develop maximum torque at 10% slip with respect to the forward rotating phasor. Less torque will be developed above or below 10% slip. The rotor will see 200% – 10% slip with respect to the counter-rotating magnetic field phasor. Little torque (see torque vs slip curve) other than a double frequency ripple is developed from the counter-rotating phasor. Thus, the single-phase coil will develop torque, once the rotor is started. If the rotor is started in the reverse direction, it will develop a similar large torque as it nears the speed of the backward rotating phasor.

Single-phase induction motors have a copper or aluminum squirrel cage embedded in a cylinder of steel laminations, typical of polyphase induction motors.

Permanent-Split Capacitor Motor

One way to solve the single phase problem is to build a 2-phase motor, deriving 2-phase power from single phase. This requires a motor with two windings spaced apart 90° electrical, fed with two phases of current displaced 90° in time. This is called a permanent-split capacitor motor.

Permanent-split capacitor induction motor

This type of motor suffers increased current magnitude and backward time shift as the motor comes up to speed, with torque pulsations at full speed. The solution is to keep the capacitor (impedance) small to minimize losses. The losses are less than for a shaded pole motor. This motor configuration works well up to 1/4 horsepower (200 watts), though, usually applied to smaller motors. The direction of the motor is easily reversed by switching the capacitor in series with the other winding. This type of motor can be adapted for use as a servo motor, described elsewhere in this chapter.

Single-phase induction motors may have coils embedded into the stator for larger size motors. Though, the smaller sizes use less complex to build concentrated windings with salient poles.

Capacitor-Start Induction Motor

In the figure below a larger capacitor may be used to start a single-phase induction motor via the auxiliary winding if it is switched out by a centrifugal switch once the motor is up to speed. Moreover, the auxiliary winding may be many more turns of heavier wire than used in a resistance split-phase motor to mitigate excessive temperature rise. The result is that more starting torque is available for heavy loads like air conditioning compressors. This motor configuration works so well that it is available in multi-horsepower (multi-kilowatt) sizes.

 

Capacitor-Run Motor Induction Motor

A variation of the capacitor-start motor (figure below) is to start the motor with a relatively large capacitor for high starting torque, but leave a smaller value capacitor in place after starting to improve running characteristics while not drawing excessive current. The additional complexity of the capacitor-run motor is justified for larger size motors.

 

A motor starting capacitor may be a double-anode non-polar electrolytic capacitor which could be two + to + (or – to -) series-connected polarized electrolytic capacitors. Such AC rated electrolytic capacitors have such high losses that they can only be used for intermittent duty (1 second on, 60 seconds off) like motor starting. A capacitor for motor running must not be of electrolytic construction, but a lower loss polymer type.

Resistance Split-Phase Motor Induction Motor

If an auxiliary winding of much fewer turns, a smaller wire is placed at 90°electrical to the main winding, it can start a single-phase induction motor. With lower inductance and higher resistance, the current will experience less phase shift than the main winding. About 30° of phase difference may be obtained. This coil produces a moderate starting torque, which is disconnected by a centrifugal switch at 3/4 of synchronous speed. This simple (no capacitor) arrangement serves well for motors up to 1/3 horsepower (250 watts) driving easily started loads.

 

This motor has more starting torque than a shaded pole motor (next section), but not as much as a two-phase motor built from the same parts. The current density in the auxiliary winding is so high during starting that the consequent rapid temperature rise precludes frequent restarting or slow starting loads.

Nola Power Factor Corrector

Frank Nola of NASA proposed a power factor corrector for improving the efficiency of AC induction motors in the mid-1970s. It is based on the premise that induction motors are inefficient at less than full load. This inefficiency correlates with a low power factor. The less than unity power factor is due to magnetizing current required by the stator. This fixed current is a larger proportion of total motor current as the motor load is decreased. At light load, the full magnetizing current is not required. It could be reduced by decreasing the applied voltage, improving the power factor and efficiency. The power factor corrector senses power factor, and decreases motor voltage, thus restoring a higher power factor and decreasing losses.

Since single-phase motors are about 2 to 4 times as inefficient as three-phase motors, there are potential energy savings for 1-φ motors. There are no savings for a fully-loaded motor since all the stator magnetizing current is required. The voltage cannot be reduced. But there are potential savings from a less than fully loaded motor. A nominal 117 VAC motor is designed to work at as high as 127 VAC, as low as 104 VAC. That means that it is not fully loaded when operated at greater than 104 VAC, for example, a 117 VAC refrigerator. It is safe for the power factor controller to lower the line voltage to 104-110 VAC. The higher the initial line voltage, the greater the potential savings. Of course, if the power company delivers closer to 110 VAC, the motor will operate more efficiently without any add-on device.

Any substantially idle, 25% FLC or less, a single-phase induction motor is a candidate for a PFC. Though, it needs to operate a large number of hours per year. And the more time it idles, as in lumber saw, punch press, or conveyor, the greater the possibility of paying for the controller in a few years operation. It should be easier to pay for it by a factor of three as compared to the more efficient 3-φ-motor. The cost of a PFC cannot be recovered for a motor operating only a few hours per day.

Review

Summary: Single-phase induction motors

Want more information on Nema Standards for Electric Motors? Feel free to contact us.

  • Single-phase induction motors are not self-starting without an auxiliary stator winding driven by an out of phase current of near 90°. Once started the auxiliary winding is optional.
  • The auxiliary winding of a permanent split capacitor motor has a capacitor in series with it during starting and running.
  • A capacitor-start induction motor only has a capacitor in series with the auxiliary winding during starting.
  • A capacitor-run motor typically has a large non-polarized electrolytic capacitor in series with the auxiliary winding for starting, then a smaller non-electrolytic capacitor during running.
  • The auxiliary winding of a resistance split-phase motor develops a phase difference versus the main winding during starting by virtue of the difference in resistance.

Comments
Comments

0/2000

Get in Touch
Guest Posts