Benutzer-Werkzeuge

Webseiten-Werkzeuge


projekte:iqmod:start

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
Nächste ÜberarbeitungBeide Seiten der Revision
projekte:iqmix [2014/02/03 20:23] – [Anleitung zur Inbetriebnahme] ycprojekte:iqmix [2014/02/05 08:33] – [Schaltplan] yc
Zeile 279: Zeile 279:
 ^ Dämpfung ^ R15,R16 ^ R14,R17 ^ R18^ ^ Dämpfung ^ R15,R16 ^ R14,R17 ^ R18^
 | 0dB | - | 100Ω | - | | 0dB | - | 100Ω | - |
-| -25dB | 120Ω | 56Ω | 450Ω |+| -20dB | 120Ω | 56Ω | 237Ω | 
 +| -25dB | 120Ω | 56Ω | 475Ω |
  
 Links zu den verwendeten Schaltkreisen: Links zu den verwendeten Schaltkreisen:
Zeile 363: Zeile 364:
     - Verpolungstest: 0..-30V, Spannung an Betriebsspannung der Schaltkreise: max. -0,8V     - Verpolungstest: 0..-30V, Spannung an Betriebsspannung der Schaltkreise: max. -0,8V
   - Bestückung X1(SMA, LO-Eingang) und Filter ohne Dämpfungsglied; Koax von Mittenanzapfung L3/L4 zu VNA   - Bestückung X1(SMA, LO-Eingang) und Filter ohne Dämpfungsglied; Koax von Mittenanzapfung L3/L4 zu VNA
-    - VNWA-Messung LO-Filter **TODO**+    - VNWA-Messung LO-Filter: {{:projekte:iqmod:lo-filter_wo_trimmer.png?100|}}
     - Spektrum Si570 mit Filter: {{:projekte:si570_lo_filter.jpg?100|Spektrum Si570 mit Filter}}     - Spektrum Si570 mit Filter: {{:projekte:si570_lo_filter.jpg?100|Spektrum Si570 mit Filter}}
   - Bestückung Rest, 50Ohm-Abschluss an X1 + X2   - Bestückung Rest, 50Ohm-Abschluss an X1 + X2
Zeile 376: Zeile 377:
     - Spiegelfrequenzunterdrückung: //xxx dB//     - Spiegelfrequenzunterdrückung: //xxx dB//
     - LO Leakage: //xxx dBc//     - LO Leakage: //xxx dBc//
 +
 +{{:projekte:iqmod:iqmod_sch_inbetrieb.pdf|Inbetriebnahme-Schaltplan}}
 +
 +===== Ansteuerung =====
 +Um normale Audio-Dateien FM-moduliert als I/Q-Signale mit einer Soundkarte ausgeben zu können, gibt es folgendes kleines Tool: **fmmod**
 +
 +<file c fmmod.c>
 +/* complex frequency modulator for i/q signal processing
 + * Sebastian Weiss <dl3yc@darc.de>
 + * Di 4. Feb 16:10:01 CET 2014
 + */
 +
 +#include <stdio.h>
 +#include <stdlib.h>
 +#include <sndfile.h>
 +#include <math.h>
 +
 +#define BUFFER_LEN  1024
 +
 +void usage(void)
 +{
 +    printf("Usage: fmmod inputfile outputfile [carrier] [freqdev]\n \
 +            inputfile: path to input file(needs to be single channel)\n \
 +            outputfile: path to output file\n \
 +            carrier: carrier frequency in Hz(standard: 0.0)\n \
 +            freqdev: frequency deviation in Hz(standard: 3000)\n");
 +}
 +
 +void process_data(double *data, int count, int fs, double fc, double freqdev)
 +{
 +    static double old_phase = 0.0;
 +    double cumsum[BUFFER_LEN];
 +    double phase;
 +    int i;
 +
 +    if (count == 0)
 +        return;
 +
 +    cumsum[0] = data[0]/fs;
 +    for (i = 1; i < count; i++) {
 +        cumsum[i] = cumsum[i-1] + data[i]/fs;
 +    }
 +
 +    for (i=0; i < count; i++) {
 +        phase = 2*M_PI*fc/fs*(i+1) + 2*M_PI*freqdev*cumsum[i] + old_phase;
 +        data[2*i] = cos(phase);
 +        data[2*i + 1] = -sin(phase);
 +    }
 +
 +    old_phase = fmod(phase, 2*M_PI);
 +    return;
 +}
 +
 +int main(int argc, char *argv[])
 +{
 +    static double data[2*BUFFER_LEN];
 +    SNDFILE *infile, *outfile;
 +    SF_INFO sfinfo;
 +    int readcount;
 +    double carrier;
 +    double freqdev;
 +
 +    if ((argc > 5) || (argc < 3)) {
 +        usage();
 +        return 1;
 +    }
 +
 +    freqdev = (argc == 5) ? atof(argv[4]) : 3000.0;
 +    carrier = (argc > 3) ? atof(argv[3]) : 0.0;
 +
 +    infile = sf_open(argv[1], SFM_READ, &sfinfo);
 +    if (!infile) {
 +        printf("%s: Not able to open input file %s\n", argv[0], argv[1]);
 +        sf_perror(NULL);
 +        return 1;
 +    }
 +
 +    if (sfinfo.channels > 1) {
 +        printf("%s: Not able to process more than 1 channel\n", argv[0]);
 +        return 1;
 +    }
 +
 +    sfinfo.channels = 2;
 +
 +    outfile = sf_open(argv[2], SFM_WRITE, &sfinfo);
 +    if (!outfile) {
 +        printf("%s: Not able to open output file %s\n", argv[0], argv[2]);
 +        sf_perror(NULL);
 +        return 1;
 +    }
 +
 +    while ((readcount = sf_read_double(infile, data, BUFFER_LEN))) {
 +        process_data(data, readcount, sfinfo.samplerate, carrier, freqdev);
 +        sf_write_double(outfile, data, 2*readcount);
 +    }
 +
 +    sf_close(infile);
 +    sf_write_sync(outfile);
 +    sf_close(outfile);
 +
 +    return 0;
 +}
 +
 +</file>
projekte/iqmod/start.txt · Zuletzt geändert: 2022/08/04 10:37 von yc

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki