Quadrature Modulators Solve Old Problems with Self-Calibration

Introduction

I was reading EETimes this month when I saw an interesting article on analog quadrature modulators (AQMs). I have not looked at these devices in a while and I noticed that some of my early issues with AQMs may not be a problem anymore. My issues had to do with the sensitivity of AQMs to small errors -- DC offsets and small phase errors. Today's versions of these circuits incorporate self-calibration capabilities that eliminate my previous concerns. The article is a good one and worth reading closely.

As I usually do, I wrote up a Mathcad worksheet as I read the article so that I could duplicate their analysis and make sure that I understand the material. This post is based on this worksheet. My design data package (i.e. all data associated with an electronics design) typically contains a number of these worksheets that describe component operation and design details.

This analysis effort is not just an academic one for me -- I actually have a home project where one these devices will be very useful.

Background

When I think of quadrature modulators, I usually think of the Weaver single-sideband (SSB) modulator shown in Figure 1, which is intended to produce the lower SSB signal. All of the discussion to follow will assume that the lower sideband is desired and the upper sideband is not. The argument can easily be flipped for an upper SSB system.

Figure 1: SSB (Lower) Generation Using the Weaver Modulator.

Figure 1: SSB (Lower) Generation Using the Weaver Modulator.

I list here some of the key points about the Weaver modulator:

  • The left-hand side of Figure 2 simply converts the input signal into its in-phase and quadrature components.

    I will not be spending any further time on this section. The Wikipedia does have a discussion of the concept.

  • The right-hand side actually generates the single sideband version of the input signal.

    This portion of the circuit is the focus of my discussion here.

  • The right-hand side will generate the lower sideband or upper sideband depending on whether you have a sum or difference function at the output, respectively.

    You can easily see how the upper sideband can be generated by changing the plus sign on the right-hand side of Equation 1 to a minus.

I always liked the visual symmetry of the Weaver modulator. Its operation is easy to understand because it represents the physical realization of a trigonometric formula, which I show in Equation 1. Its operation is well described using the product-to-sum trigonometric formulas.

Eq. 1 \displaystyle \cos \left( {{\omega }_{C}}\cdot t \right)\cdot \cos \left( {{\omega }_{B}}\cdot t \right)+\sin \left( {{\omega }_{C}}\cdot t \right)\cdot \sin \left( {{\omega }_{B}}\cdot t \right)=
\displaystyle \frac{1}{2}\cdot \cos \left( \left( {{\omega }_{C}}-{{\omega }_{B}} \right)\cdot t \right)+\cos \left( \left( {{\omega }_{C}}+{{\omega }_{B}} \right)\cdot t \right)
\displaystyle +\frac{1}{2}\cdot \cos \left( \left( {{\omega }_{C}}-{{\omega }_{B}} \right)\cdot t \right)-\cos \left( \left( {{\omega }_{C}}+{{\omega }_{B}} \right)\cdot t \right)
\displaystyle =\cos \left( \left( {{\omega }_{C}}-{{\omega }_{B}} \right)\cdot t \right)

where

  • ωC is angular frequency of the carrier.
  • ωB is the angular frequency of the baseband signal.

The Weaver modulator is often used today in digital realizations of SSB modulators. However, 30+ years ago (i.e. back in my day), EE professors warned their students to beware of analog implementations of this circuit because it is sensitive to the various DC and phase errors that occur in analog systems. If you look at Equation 1, their warning makes sense. Because analog electronics always has small DC offsets, the carrier will not be perfectly cancelled out -- an effect usually referred to as carrier leakage. Similarly, small phase errors will mean that the upper sideband will not be completely cancelled out -- sort of a sideband leakage. These errors used to take an enormous amount of effort to remove. Things are different today. We can put circuitry on the modulator chips that can introduce compensating DC and phase errors that will nearly eliminate the upper sideband leakage.

To model these errors, I will focus on the modulator portion of Figure 1, which I expand for easier viewing in Figure 2.

Figure 2: Quadrature Modulator Model.

Figure 2: Quadrature Modulator Model.

Analysis

DC Offset

I go through modeling the effect of DC offsets in Figure 3, which shows how we can:

  1. Introduce DC offsets into the in-phase (DCi) and quadrature inputs (DCq).
  2. Simplify the resulting expression to show that the modulator produces a desired term at ωC - ωB and an undesired term at ωC.
  3. Show the magnitude of the undesired term is \sqrt{DC_{i}^{2}+DC_{q}^{2}}.

Figure 3: Modeling the Effect of a DC Offset on Quadrature Modulation.

Figure 3: Modeling the Effect of a DC Offset on Quadrature Modulation.


Figure 4 illustrates the process of reducing the effect of the DC offsets by introducing compensating offsets using step-wise refinement:

  1. [red line] Introduce DC shifts into the in-phase path and find the offset that minimizes the carrier leakage.
  2. [blue line] Applying the in-phase DC shift determined above, introduce DC shifts into the quadrature-phase path and find the offset that minimizes the carrier leakage.
  3. [pink line] Applying both the in-phase and quadrature DC shifts determined above, again find the new in-phase offset that minimizes the carrier leakage. This update should be small.
  4. [green line] Applying both the updated in-phase and quadrature DC shifts determined above, again find the new quadrature-phase offset that minimizes the carrier leakage.

The example in the article and in my Figure 4 iterated four times. In theory, you will iterate until you get the error down to the level your application requires.

Figure 4: Step by Step Removal of the Carrier Leakage.

Figure 4: Step by Step Removal of the Carrier Leakage.

In the Figure 4 example, you will see that I add a small random component to the measured carrier leakage. The original article mentioned that noise caused the minimization algorithm to take multiple passes. The addition of a small amount of noise in the leakage model confirms that statement.

Phase Errors

The effect of phase errors in the system are modeled by the Sideband Suppression ratio (SBS), which I show in Equation 2.

Eq. 2 \displaystyle SBS({{G}_{LO}},\phi )=10\cdot \log \left( \frac{1+{{\left( 1+{{G}_{LO}} \right)}^{2}}+2\cdot \left( 1+{{G}_{LO}} \right)\cdot \cos \left( \phi  \right)}{1+{{\left( 1+{{G}_{LO}} \right)}^{2}}-2\cdot \left( 1+{{G}_{LO}} \right)\cdot \cos \left( \phi  \right)} \right)

where

  • GLO the gain error (i.e. difference from 1) in the local oscillator relative to the input path.
  • φ the phase shift of the local oscillator relative to the phase shifts present in the input path.

Figure 5 shows how we can go about deriving Equation 3.

Figure 5: Derivation of Sideband Suppression Ratio Equation.

Figure 5: Derivation of Sideband Suppression Ratio Equation.


We can now plot Equation 2 versus phase and gain errors using a contour plot (Figure 6).
Figure 6: Sideband Suppression Contour Plot Versus Phase Error and Amplitude Error.

Figure 6: Sideband Suppression Contour Plot Versus Phase Error and Amplitude Error.

Conclusion

This post is a discussion of a magazine article that was about a circuit that I intend to use shortly in a home project. It was interesting to see how a circuit architecture that used to have serious problems has now evolved in a very simple way to minimize these problems.

Posted in Electronics | Comments Off on Quadrature Modulators Solve Old Problems with Self-Calibration

What Does It Mean to be an Expert?

As an engineering director, I must annually review my employees for performance relative to the standards of their assigned job categories. If an employee is performing above or below their assigned standards, their job category may need to be changed. This task is important to an employee because it affects their pay. All corporations that I know of pay their employees based upon the job category that the employees are assigned to. To make it easier for me to control who is earning what, I need a reliable Payroll Software to help make this an organised process. Gone are the days where you would hand a pay packet to your employees each month, everything now is basically digital and will be transferred via trusted payroll software. For example, using ach payment processing for small business can set a business apart from those who do not want to advance with new technologies.

My tale today involves defining the word "expert." The rubric for one of our job categories requires it members to be a "recognized expert in their field." I have been mulling over what it means to be an expert. My own imprecise definition is someone who is a master of their field and who is recognized by others as such. So if I wanted to hire an expert cloud architect engineer, how would I select the expert from a sea of candidates? Would simply having a google cloud architect certification make an expert of someone? Or does it require something more? Let's see if I can put a finer edge on my definition.

Since I know others have had these questions before me, I started my research with a Google search. After a bit of time, I saw a very interesting reference on this blog -- by the way, a great blog on teaching statistics and design of experiments. It makes sense that educators would be thinking about the definition of an expert.

The reference is named "How People Learn: Brain, Mind, Experience, and School." They define an expert as having the following characteristics. I agree with each characteristic listed.

  • Experts notice features and meaningful patterns of information that are not noticed by novices.
  • Experts have acquired a great deal of content knowledge that is organized in ways that reflect a deep understanding of their subject matter.
  • Experts' knowledge cannot be reduced to sets of isolated facts or propositions but, instead, reflects contexts of applicability: that is, the knowledge is "conditionalized" on a set of circumstances.
  • Experts are able to flexibly retrieve important aspects of their knowledge with little attentional effort.
  • Though experts know their disciplines thoroughly, this does not guarantee that they are able to teach others.
  • Experts have varying levels of flexibility in their approach to new situations.

Since there are people who wish to advance into the job category that requires them to be an expert, I need to give them some guidance on how to become an expert. After some additional web searching, I saw a quotation from Willy Sansen, whose original work was titled ‘"Solid-state circuits and a career for life." His work was quoted on this blog. He was answering the question -- What advice can be given to students who want to build up a career in solid-state circuits? His advice is struck me as being true for every profession at some level.

  1. To be successful in a career, maintain a very specific field of expertise.

    Too often a designer runs through many designs, to find himself in a corner where he knows a little bit about everything. He must, instead, strive to be number one in the world in a specific field of expertise as if it were a hobby, to keep himself wanted on the market.

  2. Be known as an expert.

    Present papers at conferences or workshops, or publish papers or abstracts. Nobody is an expert unless he is accepted as an expert.

  3. Become an expert on an international level.

    The time is gone when an expert could be an expert in his little corner; globalization has flattened this world. The competition may be close by, but could also be on the other side of the earth. The designer must thus be accepted by experts everywhere.

  4. Give presentations to colleagues, to your boss, to students.

    Transferring knowledge from one person to another is an art. Only by doing so regularly, can a designer be efficient in making clear why he is an expert.

There is some gold to be mined here. As far as item (1) goes, I am afraid that most technical fields today are so rich in content that an engineer must focus their energy in order to develop an significant level of expertise. My field, electronics, is so broad today that I have had to focus on analog electronics and optics.

Notice how items (2)-(4) are all about technical communications. From my standpoint, you do not have to be internationally recognized to be an expert -- Susan Boyle was an expert singer before she was internationally recognized. An expert cannot give the title to themselves, they must earn the title with the respect of their peers. Many have to face multiple trials and tribulations, uploading their songs on apps like YouTube and SoundCloud, while getting little to no recognition. Few even turn to YouTube and Soundcloud promotion websites to get a few followers! However, many engineers do not understand that some level of career marketing is necessary in order to advance. I have known many fine engineers who felt that their expertise should be recognized without any communications effort from them. They never got anywhere.

I think I understand how to become a recognized expert:

  1. Develop deep knowledge in an area that is broad enough to be of interest to your peers, but narrow enough that you can actually master it.
  2. Learn how to communicate your knowledge to others.
  3. Take advantage of opportunities to become an advocate for your chosen area of study -- participate in trade associations, shows, conferences, and workshops.

I think this is the approach I will recommend to the folks in my group.

Posted in Management | 1 Comment

Skydiving Math

Introduction

I must admit that I was amazed at what Felix Baumgartner accomplished. As I watched the video, I found myself focusing on the video's display of Felix's speed versus time. It was really interesting to see how he quickly he accelerated to faster than Mach 1 speed and then he began to decelerate as he hit denser atmosphere. The video below is the one I was watching.

As I thought about, I could compare Felix's speed versus time data with the predictions from a differential equation. This gives me another opportunity to try out Mathcad Prime 2.0. Let's dig in ...

Background

My approach to this problem is simple:

  • Capture the empirical data from the jump video and put it into Mathcad Prime.

    This was the only routine and boring part of the exercise.

  • Capture data from NASA on the atmosphere's density and the variation in gravity with altitude.

    I used this same file for my post on Mars's atmosphere.

  • Create a differential equation model and use Mathcad Prime to solve it.

    I will use the high-speed drag model shown in the Wikipedia to keep things simple. I have used a more sophisticated drag model in a previous blog post, but I wanted to keep this one simple. Since Felix was spinning and changing position, his coefficient of drag was changing -- modeling it as a constant is sure to be wrong. I am just looking for an approximate model. However, it may provide some insight into what was going on.

  • Tune the differential equation model's coefficient of drag (defined below) to best match the empirical data

    I am constantly performing optimizations at work. I might as well start getting used to optimizations in Mathcad Prime.

  • Compare the empirical data to the tuned differential equation model and see how well the mathematics compares to reality.

    Here is where I get practice with the graphics in Mathcad Prime.

Analysis

Empirical Speed Capture

My approach to capturing the speed data was simple.

  • Watch this video.
  • Write down the numbers for times and speeds that I see on the video.

I am afraid sometimes you just have to sit there and write stuff down by hand. There are problems with gathering the data this way.

  • The data is quantized in one second intervals.
  • Sometimes the data changes two or three times during a single one second interval.
  • The speed data may also be quantized -- the speed numbers are not changing continuously.

What this means is that the data I took by hand suffers from quantization errors (both in amplitude and timing). To minimize these errors, I will both smooth and interpolate the my rough speed and time readings.

Figure 1 shows how the data looks in Mathcad Prime 2 after I did my post-processing.

Figure 1: Video Data Captured, Smoothed, Interpolated, and Plotted in Mathcad Prime 2.0.

Figure 1: Video Data Captured, Smoothed, Interpolated, and Plotted in Mathcad Prime 2.0.

Modeling Atmospheric Density and Gravity

This data comes straight from NASA and all I am doing is running the data through an interpolation routine. Figure 2 shows how this interpolation looks in Mathcad Prime.

Figure 2: NASA Data on the Atmosphere's Density and Gravity Variation with Altitude.

Figure 2: NASA Data on the Atmosphere's Density and Gravity Variation with Altitude.

Atmospheric Drag Modeling

The skydiver experiences two forces during his fall:

  • atmospheric drag
  • gravity

These two forces are combined into a single differential equation. Let's first review the effects of both drag and gravity.

The Wikipedia has a very good discussion of drag for those readers requiring more background. I will use Equation 1 from this article to model the force of drag on the skydiver.

Eq. 1 \displaystyle {{F}_{D}}=\tfrac{1}{2}\cdot \rho \cdot {{v}^{2}}\cdot {{C}_{d}}\cdot A

where

  • FD is the force of drag [N]
  • A is the cross-sectional area presented to the air stream [m2]
  • ρ(x) is the density of the atmosphere as a function of altitude [kg/m3] -- from here
  • CD is the coefficient of drag [unitless]
  • v is the velocity of the skydiver [m/s]

Gravity Modeling

Modeling the force of gravity is simpler than modeling drag, but we will increase the complexity just a tad by incorporating its variation with altitude. While this is a small effect, it does provide for a more complete model. Equation 2 shows the mathematical model I will be using.

Eq. 2 \displaystyle {{F}_{G}}=m\cdot g(h)

where

  • m is the mass of the skydiver and equipment [kg]
  • g(h) is the acceleration due to gravity as a function of height [m/s2]

I will use a guess for the mass of the skydiver (m=100 kg), and I will obtain the gravitational acceleration as a function of height from this document.

Overall Differential Equation

With both drag and gravity modeled, we can now write down the full differential equation (Equation 3).

Eq. 3 {{F}_{Total}}=-m\cdot g(h)+\tfrac{1}{2}\cdot \rho \cdot {{v}^{2}}\cdot {{C}_{d}}\cdot A

With this equation, we can now setup our differential equation solver, which I show in Figure 3.

Figure 3: Setup of the Differential Equation Solver.

Figure 3: Setup of the Differential Equation Solver.

Optimizing My Estimate for the Coefficient of Drag

I have no idea what the coefficient of drag is for a skydiver wearing a pressure suit. I will use an optimization routine to determine the coefficient of drag that best matches the empirical speed data. Figure 4 shows how this optimizer was setup.

Figure 4: Setup of the Coefficient of Drag Optimizer.

Figure 4: Setup of the Coefficient of Drag Optimizer.

Results

Figure 5 shows the comparison between my mathematical model and the empirical speed data.

Figure 5: Comparison Between Mathematical Model and Empirical Data.

Figure 5: Comparison Between Mathematical Model and Empirical Data.

Conclusion

The empirical data and the output of the mathematical model are very similar. At this point, I think I understand the modeling. It really is remarkable how good a simple model can be. The exercise also proved to be a good exercise in the use of Mathcad Prime 2.0.

Appendix A: Mathcad Source File

Here is the Mathcad Prime 2.0 file that was used to make this blog post.
Skydiving.mcdx
This is an XML file. Just download it to your desktop and open it up with Mathcad. For those without Mathcad, here is the PDF version.
Skydiver.pdf

Posted in General Mathematics, General Science | 1 Comment

Not Every Scientist Starts Out a Prodigy

Quote of the Day

A father is only as happy as his least happy child.

- Dr. Phil. This is something a dad understands.


NobelPrizeReportCardI have to share this news story about John Gurdon, who is one of the 2012 Nobel Prize Winners in Medicine. He was no prodigy -- in fact, he had issues in school. The news article contained an image of one of his school report cards. His early performance did not bode well for his future in science. In fact, one Biology report card comment was so harsh that I thought it was worth putting into my quote database (I have a database for everything).

It has been a disastrous half. His work has been far from satisfactory. His prepared stuff has been badly learnt, and several of his test pieces have been torn over; one of such pieces of prepared work scored 2 marks out of a possible 50. His other work has been equally bad, and several times he has been in trouble, because he will not listen, but will insist on doing his work his own way. I believe he has ideas about becoming a Scientist; on his present showing this is quite ridiculous, if he can't learn simple Biological facts he would have no chance of doing the work of a Specialist, and it would be sheer waste of time, both on his part, and of those who have to teach him.

Despite the proof that making a name for yourself in Science can be done regardless of difficulties in school, as Gurdon demonstrates, having success in school allows for foundations to be built going into a career. In regards to Science, schools now have laboratories with great equipment from places like SciQuip which allows for those interested in the subject to experience what a career could look like in the lab.

I have known a number of people whose performance in school bore no resemblance to their performance on the job. I have always wondered about what causes these differences in performance. After three decades in engineering, I am no closer to the answer.

Posted in General Science, Management | 2 Comments

Earth Altitude with Equivalent Pressure to Mars

Quote of the Day

In ordinary life we hardly realize that we receive a great deal more than we give, and that it is only with gratitude that life becomes rich.

Dietrich Bonhoeffer, German theologian who died fighting against Hitler. This statement reminds me of the Benedictine saying from my youth that if you want to be happy, be grateful for something.


Introduction

I have been keeping close tabs on the Curiosity rover's progress on Mars. While I find many things about Mars interesting, I find the thin atmosphere of Mars especially interesting. If you are looking for some reading on the subject, the Wikipedia has a good article . The rover image in Figure 1 shows that Mars looks pretty bleak.

Figure 1: Rover Image Showing Marineris Volcano.

Figure 1: Mars Rover Image Showing Marineris Volcano.

During my reading, I have seen different values listed for the altitudes on Earth that have the same pressure as Mars' surface. Let's see if we can understand how these equivalent Earth altitudes are arrived at.

Background

On Earth, we usually talk about pressure at sea level. Mars does not have an ocean that we can use as an altitude reference. The Wikipedia gives two points of reference for the atmospheric pressure on Mars:

This is quite a range of values. The atmospheric pressure on the surface of Mars has dynamic range of 38.5 = 1155/30. To compute the dynamic range of the Earth's surface pressure, let's use the following two points:

  • Peak of Mount Everest (8,848 meters above sea level): 33,730 pascals
  • Dead Sea (423 meters below sea level): 106,200 pascals

This means that the dynamic range of air pressure at the Earth's surface is only 3.14 =106,200/33,730. We see that the dynamic range of air pressure on Earth is much less than we would encounter on Mars.

Let's find the altitudes on Earth with the same atmospheric pressures as Olympus Mons and Hellas Planetia.

Analysis

The quickest (and cheapest) way to find the altitudes we want is to go out to NASA's web site and download a table. Using this table, we can look up the altitudes that correspond to pressures of 0.3 millibars and 11.5 millibars. Those altitudes are:

  • 11.5 millibars ⇒ 30.125 km = 98,350 feet
  • 0.3 millibars ⇒ 57.150 km = 187,500 feet

Conclusion

The surface pressure on Mars is equivalent to the range of pressures on Earth at altitudes between ~30 km and ~60 km. That seems like pretty thin atmosphere. Since humans require pressure suits for altitudes above ~19 km (called the Armstrong limit), it looks like people will always be wearing pressure suits while walking about Mars. Too bad -- I actually kind of liked the scenario shown in the movie Robinson Crusoe on Mars (Figure 2).

Figure 2: Scene from Robinson Crusoe on Mars.

Figure 2: Scene from Robinson Crusoe on Mars.

I have to admit it -- Robinson Crusoe on Mars is one of my guilty pleasures.

Save

Save

Posted in Astronomy | 36 Comments

Fuel Efficiency Math

A number of months ago, I wrote a blog post that analyzed the fuel efficiency claims of CSX, which was expressed in ton-miles per gallon. While doing some other efficiency work, I stumbled upon a web site that nicely summarized the efficiencies of a number of transportation modes. Here is a table that summarizes that data by transportation mode.

Table 1: Fuel Efficiency of Various Transportation Modes.
Transportation Mode Ton-Miles per Gallon of fuel
Semi-Trailer Trucks (half loaded) 90.5
Semi-Trailer Trucks (fully loaded) 186.6
Grain Trains (Iowa to West Coast) 437.0
Grain Trains (Iowa to New Orleans) 640.1
Barge (Iowa to New Orleans and return with 35% load) 544.5
Barge (Upper Mississippi Southbound) 953.0
Barge (Upper Mississippi Northbound with 37% load) 243.0
Small Ocean-Going Ship (>30K tons Deadweight) 574.84
Large Ocean-Going Ship (>100K tons Deadweight) 1043.4

Here is what I take from this data:

  • Full loads are much more efficient than partial loads.

    I have read that one of the ways that Walmart achieves such remarkable distribution efficiency is by making sure that every load is full. This makes sense.

  • Going downstream is easier than upstream.

    This also makes a lot of sense.

  • If you are going to ship freight on the ocean, use a large ship.

    The efficiency of large ships explains the large increase in the number of enormous container vessels over the years.

Posted in General Science | 4 Comments

How Much Radioactive Material is in a Smoke Alarm?

Quote of the Day

MacArthur could never see another sun, or even a moon for that matter, in the heavens, as long as he was the sun.

- Dwight Eisenhower on Douglas MacArthur


Introduction

I was watching this Youtube video below on Americium and they mentioned that Americium is used in small quantities in smoke detectors. I thought it would be a nice mathematics exercise to compute the mass of Americium-241 in a smoke detector. I also thought it would be another good excuse to try out Mathcad Prime 2.0.

Warning on the video - Youtube often puts advertisements at the beginning. I have no control over what they put there.

Background

There is a very complete discussion of smoke detector operation at this web site, but I will give a brief description of how they work here. For a more complete discussion of Americium and its history, try this document.

The radioactive source produces alpha particles that ionize the air in a small chamber, which makes the air conductive. This conductivity can be sensed by electronics. When the air is clear of smoke, the ionized air conducts a given amount of electrical current. During a fire, smoke particles enter the chamber and reduce the conductivity of the air. The electronics sense this change in conductivity and activate the alarm. Hopefully, you will never be in a situation where your home is on fire but, if you are, having an alarm in place and a proper fire risk assessment strategy could be crucial in protecting your home and saving lives - look here to get more info on how to do a fire risk assessment such as this.

This post will examine the amount of the radioactive material used in the home smoke detectors.

Analysis

Figure 1 shows a photograph of the smoke sensor from a home smoke detector I found on the Wikipedia.

Figure 1: Wikipedia Photograph of the Radiation Source within a Smoke Detector.

Figure 1: Wikipedia Photograph of the Radiation Source within a Smoke Detector.

We see that the smoke sensor is actually labeled with the phrase "1.0 µCi 37k Bq". This means that the radioactive source generates 1 µCurie of radiation, which equals 37,000 Bequerels (Bq). A Bq means a single decay event, which for Americium-241 means the generation of an alpha particle.

Figure 2 shows my calculations for determining the mass of Americium-241 needed to make 37,000 Bq.

Figure 2: Americium 241 Mass Calculations.

Figure 2: Americium 241 Mass Calculations.

I calculate that there must be 0.29 µgrams of Americium-241 in the smoke detector. This agrees with the value given from other sources, like here.

Conclusion

I am amazed that people can actually measure out 0.29 micrograms of anything for a consumer product. As far as Mathcad Prime 2.0 goes, I am becoming more comfortable with it. Mathcad 15 has been a good friend for the last couple of years, but I am excited by where I see Mathcad Prime going. I am looking forward to seeing what is in Mathcad Prime 3.0, which is scheduled for release next year. All this radiation isn't all that good for you and this is why you should make sure you invest in the best smoke detector on the market to ensure your safety is number one.

Posted in Electronics, General Science | 5 Comments

Variable Voltage Power Supply Control Input Design Example

Introduction

An engineer in my group is learning Mathcad and he asked me if could I show him how to use Mathcad to design the control input for a variable voltage power supply. After looking at the problem, I decided this would be a nice test case for my first use of Mathcad Prime 2.0.

Background

Let's begin the exercise by looking at how we will be controlling the output voltage of the power supply. Take a close look at Figure 1.

Figure 1: Block Diagram of the Control Input of the Power Supply.

Figure 1: Block Diagram of the Control Input of the Power Supply.

On the left-hand side of Figure 1, I show the control input for standard fixed voltage power supply. For this case, the power supply sets the output voltage (labeled OUT) to a value that will maintain a voltage on the feedback pin (labeled FB) of 1.23 V. On the right-hand side of Figure 1, I show the control input for a variable voltage supply. In this case, I sum the output voltage from Digital-to-Analog Converter (DAC) onto the FB pin along with a scaled version of the output voltage. As I increase the DAC voltage, the output voltage must drop to maintain a 1.23 V level on the FB pin. Similarly, a decrease in the DAC voltage means the output voltage must increase to compensate.

The design requires that I select three resistor values: R1, R2, and R3. There is a bit of algebra associated with determining the values of these resistors. It turns out that I saw a designer using trial and error to determine these values. Since we have a tool like Mathcad available, I thought this problem would make a nice demonstration of the power available in a computer algebra system.

Analysis

Requirements

The requirements are pretty basic:

  • The maximum power supply output voltage is 60 V.
  • The minimum power supply output voltage is 20 V.
  • The maximum DAC voltage is 2.5 V.
  • The minimum DAC voltage is 0 V.
  • The feedback pin must be maintained at 1.23 V.

Calculation

Figure 2 shows my Mathcad Prime 2.0 worksheet.

Figure 2: Screenshot of My Power Supply Control Input Design Worksheet.

Figure 2: Screenshot of My Power Supply Control Input Design Worksheet.


This analysis shows that my three resistor values are:

  • R1 = 317.8 KΩ
  • R2 = 10.0 KΩ
  • R3 = 19.9 KΩ

Conclusion

This project worked out well. It was a good exercise for Mathcad Prime 2.0. I liked the fact that it let me use units in the numerical solver. The interface was a fairly straightforward extension of the Mathcad 15.0 interface. I will continue to try Mathcad Prime on further exercises.

Posted in Electronics | 2 Comments

Habitable Planet Math

Introduction

I was reading the news the other day when I stumbled upon an article about exoplanets -- planets that are not in our solar system. The article referenced this web page that provided a Figure of Merit (FOM) for the similarity of an exoplanet to Earth. I am going to examine this FOM to determine what I can learn about it.

The subject of exoplanets has become pretty interesting in recent years. When I was a boy, all the scientific articles at the time described the search for exoplanets as hopeless. Today, scientists regularly find exoplanets by detecting the wobble planets induced in a star or the dimming of a star when a planet passes in front of it. Isn't it strange how something can go from impossible to commonplace in one generation?

I like this web page because it actually includes data that we can perform mathematical experiments on. This allows me to check my knowledge -- if I can compute their results using their data then I probably understand what they are doing.

Background

Once a scientist has detected an exoplanet, one of the first questions is -- could it support life? But what does it mean for a planet to support life? We know the Earth supports life, so if the exoplanet is physically similar to Earth then it might also support life. This is where the FOM comes into play.

FOMs are used all the time in engineering. They allow us to rank implementations relative to things like cost, performance, portability and any other criteria we deem important. In the case of an exoplanet, this web page defines the following criteria as important for habitability:

  • radius

    Exoplanets have a wide range of sizes. Even in our own solar system, the Earth is small relative to the Jupiter and Saturn. There is some evidence that planets need to be near Earth-size to form a liquid core and magnetic field.

  • density

    The Earth is considered a rocky planet. A planet similar to the Earth should have a similar density.

  • surface temperature

    Earth-like biology lives in a very narrow temperature range. Because temperature is so important, this criterion should be weighted higher than the others.

  • escape velocity

    Escape velocity is related to the acceleration due to gravity.

You could easily come up with other parameters to use for our planet habitability FOM. Obvious things are:

  • presence of water
  • presence of oxygen
  • presence of an atmosphere

The problem is that these characteristics are not easily measurable. The FOM discussed here can be computed using readily available parameters. The FOM can then be used to identify the exoplanets that should have priority for further evaluation.

Analysis

FOM Definition

Equation 1 shows the Earth Similarity Index (ESI) used by the Planet Habitability Lab of the University of Puerto Rico.

Eq. 1 ESI\triangleq \prod\limits_{i=1}^{n}{{{\left( 1-\left| \frac{{{x}_{i}}-{{x}_{i0}}}{{{x}_{i}}+{{x}_{i0}}} \right| \right)}^{\frac{{{w}_{i}}}{n}}}}

where

  • xi is the value of the ith planetary parameter (e.g. surface temperature)
  • xi0 is the value of the ith planetary parameter for Earth (our reference)
  • wi is the weighting exponent assigned to the ith planetary parameter (arbitrary value indicating relative value)
  • n is the number of planetary parameters

Equation 1 is used to define three ESI FOMs:

  • Interior ESI

    This ESI is based on the exoplanet's radius (weight exponent = 0.57) and density (weight exponent = 1.07).

  • Surface ESI

    This ESI is based on the exoplanet's surface temperature (weight exponent = 5.58) and escape velocity (weight exponent = 0.70).

  • Global ESI

    A composite of both the interior and exterior ESI's.

I will demonstrate how to compute the values of these ESI's using Mathcad.

Equation 1 is interesting because the weighting factors show the relative priorities that the astronomers assign to the planetary parameters. For example, surface temperature is given a very high weight, while the radius of the planet is given much less weight. This makes sense because the biochemical reactions that we know of can exist in only a narrow temperature range.

What do astronomers know about the exoplanets they discover?

I am not an astronomer, so I am inferring this information from my reading. Astronomers appear to get reasonably accurate values for the following planetary characteristics:

  • Revolution period around the star

    This measurement is fairly accurate when planets are detected by the wobble method.

  • Mass

    Bigger planets make bigger wobbles. Astronomers will have good information on the mass of the star that the exoplanet orbits. This should allow them to obtain good mass estimates.

  • Planet Radius

    This measurement can be made using the transit method. The bigger the planet, the more the star's light is obstructed.

  • Orbit Eccentricity

    The wobble characteristics should be able to give you this information.

  • Albedo

    See this web page for a discussion of how astronomers can get an indirect measurement of albedo. The albedo measurement is important for getting a good estimate of the exoplanet's temperature.

Applying a bit of celestial mechanics can then give you the following information:

  • Orbit Radius

    Knowing the period of revolution, Kepler's law will give you the major axis distance of the planet's orbit.

  • Density

    Straightforward calculation given planetary mass and radius.

  • Surface Gravity

    See the gravitational acceleration article on the Wikipedia.

  • Escape Velocity

    See the escape velocity article on the Wikipedia.

  • Surface Temperature

    See the effective temperature article on the Wikipedia. I cannot do a better job explaining the concept than they did. Note that determining the surface temperature requires knowing information about the albedo of the planet. Albedo data was not given on this web site, so I will not attempt to compute the surface temperature.

Figure 1 shows the equations that I did use to compute orbit radius, density, escape velocity, and surface gravity.

Figure 1: Equations Used to Compute Useful Exoplanet Parameters.

Figure 1: Equations Used to Compute Useful Exoplanet Parameters.

Appendix A contains a PDF file that shows the formulas of Figure 1 being used to compute the information required for the ESI calculation. As expected, I obtained the same results as the web page.

Calculation Method

I thought I would try to recompute their ESI results for the bodies in our solar system, which the web page authors also did. This means that I can compare my results to theirs. To keep my calculations simple, I only kept the data for bodies that rotate about the Sun, which allowed me to only have to deal with one value for Kepler's constant. The method of calculation would be identical for bodies that do not rotate around the Sun, but Kepler's constant would be different because the rotation is not about the Sun.

I downloaded their data files into Mathcad and computed the ESI using the Mathcad program shown in Figure 2.

Figure 2: Mathcad Program Used to Compute ESI Values.

Figure 2: Mathcad Program Used to Compute ESI Values.

Internal ESI Calculation

Figure 3 shows my calculation for the internal ESI value.

Figure 3: Internal ESI Results.

Figure 3: Internal ESI Results.

Surface ESI Calculation

Figure 4 shows my calculation for the surface ESI value.

Figure 4: Surface ESI Results.

Figure 4: Surface ESI Results.

Global ESI Calculation

Figure 5 shows my calculation for the global ESI value.

Figure 6: Global ESI Results.

Figure 6: Global ESI Results.

Conclusion

I was able to reconstruct the original web page results for the ESI of the various bodies in our solar system using their data plus simple celestial mechanics. This sort of calculation might be interesting for a high-school or early college science student.

Appendix A: PDF Version of My Calculations

People often ask me for copies of my original work. Since Mathcad is not as common as it should be, I will first include a PDF version of my work here.

PDF Version of My Mathcad Work

Here is a link to the raw Mathcad 15 file. It is an XML file -- just save it to your disk and run Mathcad on it.

Posted in Astronomy | 1 Comment

The Ultimate Lego-Based Analog Computer

I find this video incredible. I have heard of people reconstructing the Antikythera mechanism and I have even seen a reproduction in Bozeman, Montana. However, I have never heard of one built out of Legos before.

Posted in General Science | 2 Comments