Matching the impedance of a network to the impedance of a transmission line has two principal advantages. First, all the incident power is delivered to the network. Second, the generator is usually designed to work into an impedance close to common transmission line impedances. If it does so it is better behaved, the load impedance has no reactive part which can pull the generator frequency, and the VSWR on the line is unity or close to unity so the line length is immaterial and the line connecting the generator to the load is non-resonant.
If you look at the SMITH chart you will find a circle of constant real impedance r=1 which goes through the open circuit point and the centre of the chart. If you plot any arbitrary impedance on the SMITH chart and follow round at constant radius towards the generator, you must cross the r=1 circle somewhere. This transformation at constant radius represents motion along the transmission line towards the generator. One complete circuit of the SMITH chart represents a travel of one half wavelength towards the generator. At this intersection point your generalised arbitrary load impedance r + jx has transformed to 1 + jx', so at least the real part of the impedance equals the characteristic impedance of the line. Note x' is different from x in general.
At this point you cut the line and add a pure reactance -jx'. The total impedance looking into the sum of the line impedance and -jx' is therefore 1 + jx' -jx' = 1 and the line is matched.
Stubs are shorted or open circuit lengths of transmission line intended to produce a pure reactance at the attachment point, for the line frequency of interest. Any value of reactance can be made, as the stub length is varied from zero to half a wavelength.
Again, look at the SMITH chart and find the outer circle where the modulus of the reflection coefficient is one. On this circle are the SHORT and OPEN points, and all values of positive and negative reactance. The resistance is zero everywhere. To generate a specified reactance, start at a short circuit (or maybe an open) and follow around towards the generator until the desired reactance is obtained. Cut the stub this number of wavelengths long.
It is important to keep the total stub length as short as possible, if wider bandwidths are required. Every time you add a half wavelength to the stub length the reactance of the stub comes back to the same value. It is good design practice to make stubs in the range 0 to 0.5 wavelengths long. However, this may require an impractically short stub, so then one can make the stub just a little over 0.5 wavelengths.
If one is allowed to use either short or open stubs at will, one can always keep the total stub length in the range 0-0.25 wavelengths. A length of transmission line of 0.25 wavelengths takes us half way round the SMITH chart and transforms an open into a short, or vice versa. On microstrip it is usually easier to leave stubs open circuit, for constructional reasons. On coax line or parallel wire line, a short circuit stub has less radiation from the ends: it is difficult to make a perfect non-radiating open circuit as there are always some end effects on the line.
You are told, or find out, the load impedance ZL and the transmission line characteristic impedance Zo. Calculate the normalised impedance z=(ZL/Zo). Plot it on the SMITH chart. You are told the frequency and the velocity factor of the line. Calculate the wavelength in metres. (or cm). Follow the circle of constant radius on the SMITH chart towards the generator until the locus crosses the r=1 circle. Measure the number of wavelengths along the perimeter of the SMITH chart between the z point originally plotted, and the r=1 circle intersection. This tells you how far from the load to place your stub.
Read off from the r=1 intersection the reactance x' value. Starting from a short (or open) follow the r=0 circle around the outside of the SMITH chart until you come to a point of reactance -x'. Measure the number of wavelengths this represents from short/open end towards the generator. Cut your stub this long.
The stub is placed in series with one of the transmission line conductors. In coax this may be difficult to do technically. One therefore often resorts to shunt stub matching, where the stub and the original transmission line are connected in parallel. It is easier then to work in admittances. We notice that the SMITH chart can be used as an admittance chart merely by rotating it through 180 degrees. Normalised resistance becomes normalised conductance; normalised reactance becomes normalised susceptance. Admittances in parallel add; the short circuit point has infinite admittance and the open circuit point zero admittance. The design procedure is the same as for series stubs.
Suppose that the load impedance changes. Adjusting a single stub tuner is very difficult. One has to remove the stub, remake the line where the break was, and calculate the new stub length and point of attachment.
We can use two stubs permanently attached to the line at fixed points of attachment, and tune by altering the stub lengths. Two values have to be matched (r and x) and we have two variables; the length of each stub.
As before, the generator-end stub has reactance -jx' and is attached at a point where the line impedance, including the effect of the other stub at its fixed point of attachment, is 1+jx'. Transforming the unit r=1 circle towards the load until one reaches the load-end stub attachment, the circle r=1 transforms to another circle, call it "B", touching the outside of the SMITH chart, and also passing through its centre.
The load impedance, when transformed towards the generator up to the load-end stub position, will be a generalised impedance ZL' different from ZL. The effect of the load-end stub is to add reactance x" to ZL' so that the impedance value ZL'+jx" lies on the circle "B" above. We chose the length of the stub to make x" the required value for this to happen. If we write ZL'=r'+jx' then the effect of adding the stub is to move the reactance j(x'+x") along the constant r' curve depending on the size of x".
It is just possible for the r' curve not to intersect the circle "B", in which case a double stub match is not possible for this value of load impedance, and stub placements. Generalised adjustable tuners are therefore designed with three stubs, which are spaced at unequal intervals. Such a device is called a "Triple Stub Tuner". Sliding shorts are easily arranged in coax or waveguide.
In waveguide only, there is a special type of tuner called an E-H tuner. This has shunt and series side arms consisting of sliding shorts, attached at the same point along the guide. There is no equivalent in 2-conductor transmission line for geometrical reasons. An E-H tuner can always match any load impedance.
Stub matching is only desirable for relatively low fractional bandwidths. For wider bandwidth matching a multi-section quarter wave transformer can be used, or a tapered line. Impedance matching may be carried out using the SMITH chart for calculations and design, and lumped components taking the place of lengths of transmission line. It is possible to make undesirable reflections by using a "wrong" stub match, so care must be taken in applying stub matching in high power (e.g. transmitting) applications. It is always wise to measure the match before applying significant input power. In antenna matching situations significant mismatch can arise from alterations to the near-field environment of the antenna over time. Thus if a new antenna is added to an existing mast, it is always wise to check the matching of the pre-existing antennas.
There are practical difficulties at mm wavelengths, eg on microstrip at above 20GHz. Here, the precision of adjustment of the lengths of the stubs needs to be +/- 0.01 wavelengths for good quality matching. At 5mm wavelength this is a precision of +/- 50 microns. There are also practical difficulties at high |gamma| (reflection coefficient magnitude). Here the purpose of the stubs is to generate an equal and opposite reflection to cancel out the reflection from the nearly completely mismatched load. Clearly, to get effective cancellation, the stubs must be very precisely chosen and constructed, and the fringing-field effects become important to the point that they can dominate the design. A standard SMITH chart calculation as in this page is then unlikely to be very effective.
Motorola has a page accessing PC-based software for displaying S-parameter plots and performing matching calculations. As I haven't tried to use this I cannot comment on its effectiveness.