Skip to content

Instantly share code, notes, and snippets.

View tobin's full-sized avatar

Tobin Fricke tobin

View GitHub Profile
@tobin
tobin / sho.m
Created April 12, 2012 14:51
State space simulation of a simple harmonic oscillator
% State-Space Simple Harmonic Oscillator
%
% This script simulates a damped simple harmonic oscillator (i.e. mass on a
% spring) using a state-space description, and also implements a linear
% observer.
%
% Tobin Fricke
% 2012-04-13
% Parameters
@tobin
tobin / README
Created March 27, 2012 13:55
Quantization noise demo
Show the effect of ADC/DAC quantization noise.
@tobin
tobin / G2FOO.txt
Created March 26, 2012 16:48
LIGO front-end digital decimation filter
# FILTERS FOR ONLINE SYSTEM
#
# Computer generated file: DO NOT EDIT
#
# MODULES FeCoeff32x
#
# SAMPLING RATE 65536
#
################################################################################
### FeCoeff32x ###
@tobin
tobin / my_atan2.c
Created March 13, 2012 13:05
Inline atan2 function (asm)
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
/*
Custom atan2 function calling the FPU directly, for use when the
math library isn't available.
Tobin Fricke <[email protected]> 2012-03-13
@tobin
tobin / README
Created February 29, 2012 17:30
Exponential running average
How to calculate an exponential running average.
@tobin
tobin / README
Created February 20, 2012 09:11
Analysis of the twin-T notch filter
Analysis of the twin-T notch filter
@tobin
tobin / applysos.m
Created February 7, 2012 15:02
Apply a matrix of second order section digital filters to a timeseries.
function y = applysos(soscoef, x)
% Apply a matrix of SOS cofficients to some time series.
%
% Tobin Fricke
% 2012-02-07
if size(soscoef,2) ~= 6
error('soscoef is not the right size');
end
@tobin
tobin / aafilternew.fil
Created January 26, 2012 15:24
LISO simulation of some anti-aliasing filters
# Description: AAFILTERNEW
# File: AAFilterNew
# Revision: 2011-10-25
r r6 5.11k nin na1
r r7 5.11k na1 nb1
c c12 2.2n nb1 gnd
c c16 6.8n na1 nout1
op n4a lt1124 nb1 nout1 nout1
@tobin
tobin / filter_test.m
Created December 6, 2011 13:01
Inverting amplifier filter analysis
% Here's an attempt to sketch the filter toplogy:
%
% in R1A C1 R2A C2
% >----+--/\/\/\----||---+--+--+--/\/\/\----||---+---+----> out
% | | | | | |
% +------/\/\/\-----+ | +------/\/\/\-----+ |
% R1B | R2B |
% +--|-\ |
% | \__________________|
% R_BIAS | /
@tobin
tobin / README
Created October 21, 2011 22:40
GPS log from Pineville airplane trip and Atchafalaya boat trip
Download from my GPS from these two trips. Part of the first leg of the airplane trip
is missing.
For a quick visualization, extract the coordinates:
> grep '^T' trackOct2011.txt | awk '{print $5 " " $4}' > foo.txt
Then you can open up gnuplot and simply do:
> plot "foo.txt"