The present application claims priority to European Patent Office application No. 12163978.5 EP filed Apr. 12, 2012, the entire content of which is hereby incorporated herein by reference.
The invention concerns a method for determining a trigger level for a periodic analog signal in a digital signal processing system.
Digital signal processing (DSP) is concerned with the representation of discrete time, discrete frequency, or other discrete domain signals by a sequence of numbers or symbols and the processing of these signals. The goal of DSP is usually to measure, filter and/or compress continuous real-world analog signals. The first step is usually to convert the signal from an analog to a digital form, by sampling and then digitizing it using an analog-to-digital converter (ADC), which turns the analog signal into a stream of numbers.
The main applications of DSP are audio signal processing, audio compression, digital image processing, video compression, speech processing, speech recognition, digital communications, RADAR, SONAR, seismology and biomedicine. Specific examples are speech compression and transmission in digital mobile phones, room correction of sound in hi-fi and sound reinforcement applications, weather forecasting, economic forecasting, seismic data processing, analysis and control of industrial processes, medical imaging such as CAT scans and MRI, MP3 compression, computer graphics, image manipulation, hi-fi loudspeaker crossovers and equalization, and audio effects for use with electric guitar amplifiers.
DSP often requires accurate pulse-based measurements in connection with periodic analog signals. Here, an analog pulse signal is measured by determining a trigger level and creating a digital output each time when the analog signal level crosses the trigger level in a predetermined direction (rising or falling). Due to natural fluctuations of the analog signal, jitter will occur. Jitter is the undesired deviation from true periodicity of the periodic signal.
Usually, determination of trigger level consists of determination of the maximum and minimum levels of the input signal, then using the half point between minimum and maximum. Sometimes this method is not proper, e.g. when additional, lower amplitude peaks can appear in the trigger signal due to reflections.
Therefore, the problem that the invention wants to solve is to provide a method for determining a trigger level in order to reduce output jitter as much as possible and avoid false trigger events.
This problem is inventively solved by a method comprising the steps of:
The invention is based on the consideration that output jitter is highly dependent on the trigger level choice for processing of the signal. Thus, the trigger level should be carefully chosen from a plurality of potential trigger levels. These trigger levels should be distributed between the minimum and maximum levels of the analog signal that has been measured for a predetermined time in order to have a broad range of potential trigger levels. To find the best trigger level, the jitter created by processing the signal with a number of the potential trigger levels is evaluated. The evaluation and possible further manipulations result in a jitter value characteristic for the jitter. Then, the optimal trigger level is determined based on the lowest jitter value.
Advantageously, the predetermined time for measuring the analog signal is longer than the period of the signal. This ensures that the measurement will indeed cover the global minimum and maximum of the signal and thus a proper choice of potential trigger values.
Furthermore, the potential trigger values are advantageously evenly spaced. This ensures a broad range of different trigger values for the choice.
Another problem regarding trigger levels occurs when the analog signal strength changes. With simple methods, small changes in the amplitude can change the trigger level or the trigger-based detection can fail due to big changes in the analog signal. Therefore, the trigger level must not always be adjusted, because this can produce jitter on phase measurements based on trigger pulses. However, at strong signal changes the trigger level should be changed, otherwise trigger detection can fail. This problem is solved by advantageously interrupting the execution of the method as described above if the difference of the measured minimum and maximum values of the signal differ from the minimum and maximum values measured during a previous execution of the method by less than a predetermined value.
Determination of the jitter level of a given potential trigger level can be done by various ways. Advantageously, the jitter created by processing the signal is determined by means of a linear regression over a plurality of periods of the signal. This ensures a reliable assessment of the jitter created by a certain trigger level. Advantageously, the linear regression should be extended to 5 or more periods of the signal.
To improve the determination of the optimal trigger level, the jitter values measured in a first step can be further manipulated during assignment of the jitter value to a certain trigger level. Advantageously, assigning a jitter value includes taking a sliding average over a plurality of trigger values. At fine trigger level resolution this method can help to keep distance from trigger parts where the jitter suddenly increases. However, when the trigger level resolution is rough (e.g. only 5 levels) this step may be unnecessary.
Furthermore, assigning a jitter value advantageously includes replacing a measured value with a predetermined threshold value. If the jitter at a given trigger band is lower than this value, then it is accepted as ‘very good jitter level’, regardless to its exact value and replaced by the threshold level. This means that in the following procedures, these low jitter levels will be handled uniformly which simplifies these procedures.
Assigning a jitter value further advantageously includes weighting a plurality of measured values with a predetermined weighting function. For example, a V-shaped weighting function can be used to shift the optimum towards the middle of the trigger safe area. Usually, this very small weighting has no effect. It is useful when the trigger output signal is near to the ideal one and all potential trigger levels have the same small jitter. In this case any of the trigger levels can be chosen. The best choice in this case is to choose the middle one. With this gentle weighting this is also possible.
A digital signal processing system advantageously comprises means for executing the method of any of the preceding claims.
The advantages achieved by the present invention include the provision of a new trigger level calculation method that is able to determine proper trigger levels automatically from the digitized analog input signal. The trigger level determination is based on jitter measurement on different trigger levels. For the comparison, the measured jitter levels are further processed: filtered, thresholded and weighted to ensure proper trigger selection in extreme cases as well. The accuracy of calculations is improved by using linear interpolation between neighbouring samples around the trigger level to determine trigger times more accurately. Furthermore, the method changes the output only, if the input signal is significantly changed. This behavior is advantageous at phase measurements to avoid additional phase jitter because of trigger level change.
An embodiment of the invention is further explained by means of a FIGURE, wherein the only FIGURE shows a representative block diagram of the method steps to determine a trigger level.
The method according to the embodiment of the FIGURE requires the following parameters:
The timeout value T is a time interval within which the input signal makes at least one period. Safe area limits are limit numbers given in percent. If the interval between the minimum and maximum value of input signal is 0-100%, then minimum and maximum safe area numbers select a smaller interval in which the optimum trigger level can be selected. Trigger slope direction tells, if the trigger level to be determined relates to rising edge (bRisingDirection=TRUE) or falling edge (bRisingDirection=FALSE).
The method consists of the following states:
The pseudocode for this is shown in the following:
STATE3: performing extended measurement. The length of this extended measurement is 5 times timeout for each trigger level to collect several periods and determine periodlength jitter and average with enough accuracy. This determination can be run parallel on all trigger levels to save measurement time, but also can be run serial to save CPU time. The trigger detection has the following psudocode:
Calculation of auxiliary variables means a recursive regression calculation. It uses linear interpolation to determine the trigger time more accurate:
The auxiliary variables for regression calculation are:
The reference value can be the first periodlength value. This helps to keep the sum of numbers small and therefore accurate. Calculation of jitter is the following:
Calculation of the average periodtime can be done simply by adding together the measured periodlength values and at the end divide the sum by Cnt.
STATE 4: Evaluating the best trigger level by assigning 5 to the respective potential trigger value a jitter value characteristic for the jitter created by processing the signal with the potential trigger value and then determining 6 the optimal trigger level based on the lowest jitter value. In the described embodiment, this is not simply the level with the lowest measured jitter because for example selection is not possible or not the best if the jitter is the same or almost the same on all potential trigger levels. Therefore the “best trigger level” is found as follows:
The method can also calculate the following trigger quality numbers:
If this value is higher than 2 μsec, the block must sign that the output is not OK. (The periodlength parameters are calculated with linear interpolation to make accurate jitter measurements.)
If this number is around one, this means that the jitter is small everywhere in the safe trigger area. This is the behavior of the ideal trigger signal. If this value is high, this means that certain signal parts are not recommended for triggering that could be a problem if the trigger signal amplitude changes.
If this number is around 0, this means that the measured periodlength is the same everywhere, which is the ideal case. If the difference is high, then different periodlength values can be measured at different trigger bands. The reason for this could be high jitter, or extra, unwanted, low amplitude impulses in the input signal.
Thus, the method according to the embodiment determines quality numbers about the goodness of trigger. These are signal peak-to-peak, absolute jitter value, relative jitter value (relative to periodlength), ratio of jitter of chosen trigger level and average jitter in all examined trigger bands, ratio of periodlength if chosen trigger level and average periodlength in all examined trigger bands. These quality numbers can be checked by the user and used to make decisions.
All steps described above are executed automatically by a processing unit in a digital signal processing system.
Number | Date | Country | Kind |
---|---|---|---|
12163978.5 | Apr 2012 | EP | regional |