|
|
||||||||||||||||||||||||
Logical Expressions - Half Wave BridgeAbout the writer: Harvey Morehouse is a contractor/consultant with many years of experience using circuit analysis programs. His primary activities are in Reliability, Safety, Testability and Circuit Analysis. He may be reached at harvey.annie@verizon.net. Simple questions for which I know the answer are free. Complex questions, especially where I am ignorant of the answers, are costly!!! Summary: In previous articles of this series I showed how to create logical expressions and implement ideal and perfect diode models. These models do not fully work in all cases when two such diodes are connected essentially in parallel or in anti-parallel. I have decided to prepare an implementation of a semi- ideal half wave bridge which does not have these limitations. This is a natural extension of the work in the previous articles. I call this model semi-ideal in that it incorporates a forward diode drop (which could be zero), but there is no breakdown voltage for these diodes. Half Wave Bridge: A half wave bridge circuit consists of two diodes. First we will develop a 'positive' implementation first, wherein the two diodes are connected at their anodes (the nominal output) and each diode cathode is separately connected to some driving voltage source circuitry. Normally these connections would be the extremities of a push-pull transformer winding, with the transformer center-tap grounded. The connected anodes are themselves normally connected to a load circuit. 'Positive' Bridge realization: A test circuit illustrating this is shown in Figure 1 following.
One of the diodes (D1) is represented by nonlinear source B1 and resistor R1, and the second diode (D2) by nonlinear source B2 and resistor R2. Before attempting to add the equations for B1 and B2 it is useful to first determine the different regions of operation of this circuit, which will drive their realization.
The following table shows the diode voltages under these conditions:
Note that WERE we to add breakdown voltage conditions to the diodes, there would be several more regions to consider. Specifically, that for regions 1 and 2 an additional condition of the non-conducting diode COULD be that it is in a breakdown region, and for region 4, three conditions could be added where one or both diodes could be in a breakdown condition. This would add 5 regions to the table of operations. And were the diodes to have different breakdown voltages, more conditions could arise. These conditions are NOT added, however, as first, the purpose of the model is to add a SIMPLIFIED behavioral model of a half wave bridge. Second, breakdown generally will not (or should not) occur in a well designed/specified bridge under normal operating conditions. If for some reason this condition is important, it is suggested that 'real' diodes be used to construct a bridge either initially or later in the modeling and analysis to examine those conditions. (Of course the reader can add those conditions to the model if desired. This is left as an exercise for the reader.) One COULD add the restriction that the magnitude of V(n1) was never equal to the magnitude of V(n2), removing condition 3, but for generality and also for illustration purposes this will not be done. Given the preceding conditions, we can now create the equations for each diode. In doing so, to simplify the model slightly, we shall now implement the function in an IF THEN ELSE manner. Thus for diode D1, the voltage across it will be v(n1) - v(n3), the 'ELSE' CONDITION or 'non-conducting state, unless the conduction conditions are met,.. The conduction conditions are that v(n1) -VF >v(n3) AND {v(n1)>v(n2) OR v(n1)=v(n2)}. The most interesting part is the equality condition. Remembering that the 'u' function is a 'greater than' test, its realization is a little tricky. The logical inverse of a 'greater than' condition is an 'equal to or less than' condition, not the desired 'equal to condition'. However, with a little manipulation it can be achieved. Consider voltages 'a' and 'b'. If a> b, u(a-b) = 1, whereas it is zero if a = b. Then its logical inverse, (1 - u(a - b)) is zero if they are non-equal. If it is unity, a is equal to b, or a is less than b. The same is true for u(b - a). Thus, for the function (1-u(a - b)) * (1-u(b - a)) the only way the product can be true is if a = b, as a cannot be less than b simultaneously with b being less than a. As the terms are multiplied, the value must be zero or unity. The logical AND of two conditions is their product.
The logical OR function is found by operating on the sum of two conditions, Consider f(a) and f(b). The OR is (almost) found by arithmetic addition. Thus, f(a) + f(b) will be greater than zero IF either f(a) or f(b) is greater than zero, however both could be true. Thus the desired function is of the form u(f(a) +f(b)), which will return a unity value if either or both are true. Note that f(a) and f(b) are logical expressions. The ELSE result is the diode voltage if the preceding equation is not met. If the conditions are met, a multiplier of the above equation must produce the diode on voltage as a resultant. Thus, the voltage generator equation for diode D1 becomes:
In a similar manner, the equation for diode D2 becomes:
The equations are realizable enough, however, the function COULD be implemented in a somewhat 'complementary' fashion. E.G., one could implement the controlled voltage source as one where the diode was conducting unless the conditions for non-conduction were met. It is worth investigating to determine if an alternate implementation offers any simplification, but with far less explanatory verbiage. In this case, the diode (D1) is conducting at a voltage equal to VF unless (v(n2) > v(n1) AND ( NOT (v(n1) -VF > v(n3)) whereas the D1 voltage will be equal to v(n1) - v(n3). The voltage expression for the D1 model B1 source becomes:
The similar expression for diode D2 is:
In the D1 equation the nominal voltage is VF. However, if v(n2) > v(n1) diode D2 may be conducting, but D1 is not. Also, if NOT (v(n1) - VF > v(n3)) diode D1 is not conducting. This eliminates the cumbersome '=' expression in the former equations. But what if v(n1) = v(n2) and v(n1) - VF > v(n3)? In this case, the logical expression equates to unity as u(v(n2) - v(n1)) is zero, but the second part, ( 1 - u(v(n1) - VF -v(n3)))), will be true - for D1 and D2. Thus BOTH diodes will conduct for this condition. This appears to be much simpler than the previously derived diode equations, hence we will try to implement this function. Figure 2 is a circuit suitable to test this model.
The netlist for this circuit is:
Several items are worth noting at this point. First, the resistors R1 and R2 are essential to the model. Second, the resistors cannot be made much smaller than shown without causing convergence problems. (1 milli-ohm seems to be a small enough value for most purposes). Third, the VB value used in this text for the diode 'ON' voltage was set at 1 volt, to clearly illustrate its effect in the graphs shown later, however it could be set to zero). Fourth, the step limit was set to 1u sec to give a good plot resolution. Fifth, the integration method was set to 'gear', which often provides a more robust solution method. A graph of the output is shown in Figure 3 following:
The graph shows the bridge conducts as expected, with slightly less than 360 degrees of conduction due to the effects of the non-zero value of 1v chosen for VF. The peak value of voltage at N3 of 9v shows the effect of VF being set at 1v. Just to ensure that the circuit is working VF can be set to zero, and a capacitor of 100 uF added across the load resistor. The effect of just the added capacitor is shown in the graph of Figure 4.
This plot is as expected, and the added curve of the current through D1 (B1 voltage source current) shows an impulsive current of about 800 ma flows at startup. Diode D1 current shows that it subsequently conducts with a small duty cycle. It is worthwhile to experiment with the circuit to see the effects of adding Equivalent Series Resistance (ESR) to the filter capacitor, varying values of VF and other modifications. NOTE: If one were to plot D1 and D2 currents, it would seem at first glance that the diode currents were unbalanced, however, realizing that D1 has an impulsive current and D2 does not and also that the D1 and D2 current plots have different 'y' axis scales, it is seen that after the initial transient start-up the currents are identical. One could also model the circuit using the first realization method (non-conducting diodes unless the conduction conditions are met). This is left as an exercise for the reader. All there is left to do now is to create a parameterized subcircuit part of the diode only portion of the circuit, as well as create a suitable graphic representation of the device. The passed parameters could be just VF, but it might be useful to also have a value passed for resistors R1 and R2. The default value for VF is somewhat arbitrary, whereas that of resistors R1 and R2 should not be much less than 1 milli-ohm. This is also left as an exercise for the reader, but it is assumed that this parameterized subcircuit part and an appropriate symbol will be added to the standard library by the B2 SPICE persons, sooner or later, to enable uniform and consistent part usage by users. 'Negative' Bridge realization: Having tried (hopefully with some success) to clearly show the steps in the 'positive' half wave diode bridge implementation, the realization of the 'negative' implementation will now be done in a much more abbreviated manner. However, some thought will be required. One cannot just reverse the sense of the B1 and B2 voltage generators from that of the previous model in order to achieve the 'negative' realization. Indeed, the 'sense` of these generators in the model is largely immaterial if the underlying voltage generator equation is correct. The only effect this would have in that event would to change the sense of the plotted currents through the equivalent diodes (a plot of B1 or B2 currents). But to keep the current sense correct the model I choose to implement will not reverse the generator polarities. The underlying equations must be slightly modified as well to reflect the conduction and non-conduction conditions. For the 'negative' half wave bridge, the voltage equation for diode D1 is:
The similar expression for diode D2 is:
The corresponding schematic is shown in Figure 5 following: In this circuit the value for VF was set at 1v as in the previous example. The corresponding netlist for this circuit is:
Validation and testing of this model is left as an exercise for the reader. This circuit can and should be made into a parameterized subcircuit. Note: As the sense of the B1 and B2 generators was left unchanged, and the passed VF value is positive as before. It is expected that BB will create a parameterized subcircuit and symbol for this device in the interests of uniformity, and again the values of VF and the resistors R1 and R2 will be passed parameters, with appropriate default values. Conclusions: A half wave diode bridge, (nearly ideal when VF is passed as 0.0v) has been created, for both senses of the output. This adds more behavioral models to our available parts for selection in modeling. This model should be capable of addition to any SPICE3 product. If the product DOES directly support behavioral expressions, these could be easily modified to incorporate these devices.
|
||||||||||||||||||||||||
|
||||||||||||||||||||||||