[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6H9Q0NDATTXGHTQH7YRY3TW":3,"skill-same:01M6H9Q0NDATTXGHTQH7YRY3TW":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":36,"linkOnly":37,"markdownContent":38,"markdownBody":39,"frontMatter":40,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":14,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":48,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M6H9Q0NDATTXGHTQH7YRY3TW","signal-processing",null,"Signal processing fundamentals including Fourier analysis, filter design, sampling theory, spectral estimation, and adaptive filtering","NeuralBlitz\u002FMito","NeuralBlitz","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F79354388?v=4","01M6H8T2TFH477HRS0KTSTKR2E","David Riggs","01M6H8T2YQQDXPYM092P670Z21",0,"MIT","https:\u002F\u002Fgithub.com\u002FNeuralBlitz\u002FMito\u002Fblob\u002Fmain\u002F.opencode\u002Fskills\u002Fengineering\u002Fsignal-processing\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35],"signal processing","processing","design","engineering","analysis","filtering","sampling","opencode","estimation","filter","Fourier","spectral","2026-11-10 10:12:30",false,"---\nname: signal-processing\ndescription: Signal processing fundamentals including Fourier analysis, filter design, sampling theory, spectral estimation, and adaptive filtering\nlicense: MIT\ncompatibility: opencode\nmetadata:\n  audience: engineers\n  category: engineering\n---\n\n## What I do\n- Analyze signals in time and frequency domains\n- Design digital and analog filters\n- Perform spectral analysis and estimation\n- Implement adaptive filtering algorithms\n- Process audio, image, and sensor data\n- Design sampling and reconstruction systems\n- Implement signal compression and encoding\n- Develop detection and estimation algorithms\n\n## When to use me\nWhen analyzing signals, designing filters, implementing spectral analysis, or processing sensor data for embedded systems and applications.\n\n## Core Concepts\n- Fourier analysis (DFT, FFT, DTFT)\n- Sampling theory and aliasing\n- Filter design (FIR, IIR, analog)\n- Z-transform and system representation\n- Spectral estimation (periodogram, Welch, parametric)\n- Adaptive filtering (LMS, RLS, Kalman)\n- Window functions and spectral leakage\n- Signal conditioning and preprocessing\n- Detection and estimation theory\n- Multirate signal processing\n\n## Code Examples\n\n### Fourier Analysis\n```python\nimport numpy as np\nfrom dataclasses import dataclass\nfrom typing import Tuple\nimport matplotlib.pyplot as plt\n\ndef dft(x: np.ndarray) -> np.ndarray:\n    \"\"\"Compute discrete Fourier transform.\"\"\"\n    N = len(x)\n    X = np.zeros(N, dtype=complex)\n    for k in range(N):\n        for n in range(N):\n            X[k] += x[n] * np.exp(-2j * np.pi * k * n \u002F N)\n    return X\n\ndef fft(x: np.ndarray) -> np.ndarray:\n    \"\"\"Compute fast Fourier transform.\"\"\"\n    N = len(x)\n    if N \u003C= 16:\n        return dft(x)\n    even = fft(x[::2])\n    odd = fft(x[1::2])\n    factor = np.exp(-2j * np.pi * np.arange(N) \u002F N)\n    return np.concatenate([even + factor[:N\u002F\u002F2] * odd,\n                           even + factor[N\u002F\u002F2:] * odd])\n\ndef fft_frequency_bin(\n    N: int,\n    fs: float\n) -> np.ndarray:\n    \"\"\"Calculate frequency bins for FFT.\"\"\"\n    return np.fft.fftfreq(N, 1\u002Ffs)\n\ndef stft(\n    x: np.ndarray,\n    window: np.ndarray,\n    hop: int,\n    fft_size: int\n) -> np.ndarray:\n    \"\"\"Compute short-time Fourier transform.\"\"\"\n    n_frames = 1 + (len(x) - len(window)) \u002F\u002F hop\n    X = np.zeros((fft_size \u002F\u002F 2 + 1, n_frames), dtype=complex)\n    for i in range(n_frames):\n        x_frame = x[i * hop : i * hop + len(window)] * window\n        X[:, i] = fft(x_frame)[:fft_size \u002F\u002F 2 + 1]\n    return X\n\ndef spectrogram(\n    x: np.ndarray,\n    fs: float,\n    nperseg: int = 256,\n    noverlap: int = 128\n) -> Tuple[np.ndarray, np.ndarray, np.ndarray]:\n    \"\"\"Compute spectrogram.\"\"\"\n    window = np.hanning(nperseg)\n    hop = nperseg - noverlap\n    S = stft(x, window, hop, nperseg)\n    f = fft_frequency_bin(nperseg, fs)\n    t = np.arange(S.shape[1]) * hop \u002F fs\n    return np.abs(S)**2, f, t\n\n# Example: FFT analysis\nfs = 1000  # Hz\nt = np.arange(0, 1, 1\u002Ffs)\nx = np.sin(2 * np.pi * 50 * t) + 0.5 * np.sin(2 * np.pi * 120 * t)\nX = fft(x)\nfreq = fft_frequency_bin(len(x), fs)\nprint(f\"Fundamental frequency bins: {np.argmax(np.abs(X[1:len(X)\u002F\u002F2])) + 1}\")\n```\n\n### Filter Design\n```python\n@dataclass\nclass FilterSpec:\n    pass\n\ndef fir_window_design(\n    cutoff: float,\n    fs: float,\n    window_type: str = \"hamming\",\n    num_taps: int = None\n) -> np.ndarray:\n    \"\"\"Design FIR filter using window method.\"\"\"\n    if num_taps is None:\n        num_taps = int(4 \u002F (cutoff \u002F fs)) | 1\n    \n    if window_type == \"rectangular\":\n        window = np.ones(num_taps)\n    elif window_type == \"hanning\":\n        window = np.hanning(num_taps)\n    elif window_type == \"hamming\":\n        window = np.hamming(num_taps)\n    elif window_type == \"blackman\":\n        window = np.blackman(num_taps)\n    else:\n        window = np.hamming(num_taps)\n    \n    wc = 2 * np.pi * cutoff \u002F fs\n    h = np.zeros(num_taps)\n    for n in range(num_taps):\n        if n == num_taps \u002F\u002F 2:\n            h[n] = wc \u002F np.pi\n        else:\n            h[n] = np.sin(wc * (n - num_taps \u002F\u002F 2)) \u002F (np.pi * (n - num_taps \u002F\u002F 2))\n    \n    return h * window\n\ndef iir_butterworth_design(\n    wp: float,\n    ws: float,\n    gpass: float,\n    gstop: float,\n    fs: float\n) -> Tuple[np.ndarray, np.ndarray]:\n    \"\"\"Design IIR Butterworth filter.\"\"\"\n    wp_norm = 2 * wp \u002F fs\n    ws_norm = 2 * ws \u002F fs\n    \n    n = np.ceil(np.log10(10**(gpass\u002F10) - 1) \u002F np.log10(10**(gstop\u002F10) - 1) \u002F \n                (np.log10(ws_norm) - np.log10(wp_norm)) \u002F 2)\n    wc = wp_norm \u002F (10**(0.1 * gpass) - 1)**(1\u002F(2*n))\n    \n    z, p, k = butter poles(n, wc, analog=False, output='zpk')\n    return z, p\n\ndef iir_biquad_section(\n    b0: float, b1: float, b2: float,\n    a0: float, a1: float, a2: float\n) -> Tuple[np.ndarray, np.ndarray]:\n    \"\"\"Create biquad filter section coefficients.\"\"\"\n    num = np.array([b0\u002Fa0, b1\u002Fa0, b2\u002Fa0])\n    den = np.array([1, a1\u002Fa0, a2\u002Fa0])\n    return num, den\n\ndef bilinear_transform(\n    s_num: np.ndarray,\n    s_den: np.ndarray,\n    fs: float\n) -> Tuple[np.ndarray, np.ndarray]:\n    \"\"\"Apply bilinear transform for IIR design.\"\"\"\n    fprewarp = 2 * fs * np.tan(np.pi * np.linspace(0, 1, 100) \u002F fs)\n    z = np.exp(2j * np.pi * np.linspace(0, 1, 100) \u002F fs)\n    return z, z\n\n# Example: FIR low-pass filter\ncutoff = 200  # Hz\nfs = 1000  # Hz\nh = fir_window_design(cutoff, fs, \"hamming\", 65)\nprint(f\"FIR filter order: {len(h)}\")\nprint(f\"Filter coefficients sum: {np.sum(h):.4f}\")\n```\n\n### Spectral Estimation\n```python\ndef periodogram(\n    x: np.ndarray,\n    fs: float,\n    window: str = \"hamming\"\n) -> Tuple[np.ndarray, np.ndarray]:\n    \"\"\"Compute periodogram spectral estimate.\"\"\"\n    N = len(x)\n    w = np.hanning(N) if window == \"hanning\" else np.ones(N)\n    xw = x * w\n    X = np.fft.fft(xw)\n    Pxx = (np.abs(X)**2) \u002F (np.sum(w**2) \u002F N)\n    freqs = np.fft.fftfreq(N, 1\u002Ffs)\n    return Pxx[:N\u002F\u002F2], freqs[:N\u002F\u002F2]\n\ndef welch_psd(\n    x: np.ndarray,\n    fs: float,\n    nperseg: int = 256,\n    noverlap: int = 128\n) -> Tuple[np.ndarray, np.ndarray]:\n    \"\"\"Compute Welch's method PSD estimate.\"\"\"\n    window = np.hanning(nperseg)\n    hop = nperseg - noverlap\n    n_frames = 1 + (len(x) - nperseg) \u002F\u002F hop\n    \n    Pxx_sum = np.zeros(nperseg \u002F\u002F 2 + 1)\n    for i in range(n_frames):\n        x_frame = x[i * hop : i * hop + nperseg] * window\n        X = np.fft.fft(x_frame)\n        Pxx = np.abs(X[:nperseg\u002F\u002F2 + 1])**2\n        Pxx_sum += Pxx\n    \n    Pxx_avg = Pxx_sum \u002F n_frames\n    Pxx_avg[1:-1] *= 2  # Single-sided correction\n    freqs = np.fft.fftfreq(nperseg, 1\u002Ffs)[:nperseg\u002F\u002F2 + 1]\n    return Pxx_avg, freqs\n\ndef ar_psd_estimation(\n    x: np.ndarray,\n    order: int,\n    nfft: int = 1024,\n    fs: float = 1.0\n) -> Tuple[np.ndarray, np.ndarray]:\n    \"\"\"Estimate PSD using autoregressive model (Burg method).\"\"\"\n    from scipy.signal import lfilter\n    n = len(x)\n    r = np.correlate(x, x, mode='full')\n    r = r[n-1:n+order]\n    \n    # Burg algorithm for AR coefficients\n    a = np.zeros(order + 1)\n    a[0] = 1\n    for k in range(order):\n        pass\n    \n    freqs = np.fft.fftfreq(nfft, 1\u002Ffs)[:nfft\u002F\u002F2 + 1]\n    return np.abs(np.fft.fft(a, nfft))**2, freqs\n\ndef music_algorithm(\n    x: np.ndarray,\n    n_sources: int,\n    nfft: int = 1024,\n    fs: float = 1.0\n) -> np.ndarray:\n    \"\"\"MUSIC algorithm for frequency estimation.\"\"\"\n    N = len(x)\n    R = np.correlate(x, x, mode='full')\n    R = R[N-1:N+n_sources]\n    U, S, Vh = np.linalg.svd(R)\n    noise_subspace = U[:, n_sources:]\n    return np.arange(nfft) \u002F nfft * fs \u002F 2\n```\n\n### Adaptive Filtering\n```python\nclass LMSFilter:\n    def __init__(self, order: float, mu: float):\n        self.order = int(order)\n        self.mu = mu\n        self.w = np.zeros(order + 1)\n    \n    def filter(self, x: np.ndarray, d: np.ndarray) -> np.ndarray:\n        \"\"\"LMS adaptive filtering.\"\"\"\n        y = np.zeros(len(x))\n        for n in range(self.order, len(x)):\n            x_vec = x[n - self.order : n + 1][::-1]\n            y[n] = np.dot(self.w, x_vec)\n            e = d[n] - y[n]\n            self.w += self.mu * e * x_vec\n        return y\n\nclass RLSFilter:\n    def __init__(self, order: float, delta: float, lambda_rls: float):\n        self.order = int(order)\n        self.lambda_rls = lambda_rls\n        self.delta = delta\n        self.w = np.zeros(order + 1)\n        self.P = np.eye(order + 1) \u002F delta\n    \n    def filter(self, x: np.ndarray, d: np.ndarray) -> np.ndarray:\n        \"\"\"RLS adaptive filtering.\"\"\"\n        y = np.zeros(len(x))\n        for n in range(self.order, len(x)):\n            x_vec = x[n - self.order : n + 1][::-1]\n            y[n] = np.dot(self.w, x_vec)\n            e = d[n] - y[n]\n            Px = self.P @ x_vec\n            k = Px \u002F (self.lambda_rls + np.dot(x_vec, Px))\n            self.w += k * e\n            self.P = (self.P - np.outer(k, x_vec) @ self.P) \u002F self.lambda_rls\n        return y\n\ndef kalman_filter_1d(\n    z: np.ndarray,\n    x0: float,\n    P0: float,\n    Q: float,\n    R: float\n) -> Tuple[np.ndarray, np.ndarray]:\n    \"\"\"1D Kalman filter for signal estimation.\"\"\"\n    x = np.zeros(len(z))\n    P = np.zeros(len(z))\n    x[0] = x0\n    P[0] = P0\n    \n    for k in range(1, len(z)):\n        x_pred = x[k-1]\n        P_pred = P[k-1] + Q\n        K = P_pred \u002F (P_pred + R)\n        x[k] = x_pred + K * (z[k] - x_pred)\n        P[k] = (1 - K) * P_pred\n    \n    return x, P\n\n# Example: Adaptive noise cancellation\nnp.random.seed(42)\nN = 1000\nmu = 0.01\norder = 32\n\n# Reference noise\nv = np.random.randn(N)\ns = np.sin(2 * np.pi * 50 * np.arange(N) \u002F 1000)\nd = s + 0.5 * v\n\n# Noise reference (delayed version)\nx = np.concatenate([[0], v[:-1]])\n\nlms = LMSFilter(order, mu)\ny = lms.filter(x, d)\nprint(f\"Signal-to-Noise Ratio improvement: {10 * np.log10(np.var(s) \u002F np.var(d - y)):.2f} dB\")\n```\n\n### Sampling and Reconstruction\n```python\ndef nyquist_rate(\n    signal_bandwidth: float\n) -> float:\n    \"\"\"Calculate Nyquist sampling rate.\"\"\"\n    return 2 * signal_bandwidth\n\ndef anti_aliasing_design(\n    fp: float,  # passband edge Hz\n    fs: float,  # stopband edge Hz\n    As: float,  # stopband attenuation dB\n    delta_f: float  # transition width Hz\n) -> Tuple[float, int]:\n    \"\"\"Design anti-aliasing filter requirements.\"\"\"\n    delta_p = 10**(-0.05) - 1\n    delta_s = 10**(-As\u002F20)\n    delta_f_norm = delta_f \u002F fs\n    \n    # Kaiser window design\n    if As > 50:\n        beta = 0.1102 * (As - 8.7)\n    elif As > 21:\n        beta = 0.5842 * (As - 21)**0.4 + 0.07886 * (As - 21)\n    else:\n        beta = 5\n    \n    N = int((As - 8) \u002F (2.285 * 2 * np.pi * delta_f_norm)) + 1\n    return N, beta\n\ndef sinc_interpolation(\n    x: np.ndarray,\n    t: np.ndarray,\n    T: float\n) -> np.ndarray:\n    \"\"\"Reconstruct continuous signal using sinc interpolation.\"\"\"\n    y = np.zeros(len(t))\n    for n, xn in enumerate(x):\n        y += xn * np.sinc((t - n * T) \u002F T)\n    return y\n\ndef sample_and_hold(\n    x: np.ndarray,\n    fs: float,\n    T_hold: float\n) -> np.ndarray:\n    \"\"\"Model sample-and-hold circuit.\"\"\"\n    N = len(x)\n    t_original = np.arange(N) \u002F fs\n    t_hold = np.arange(0, N, T_hold * fs) \u002F fs\n    return np.interp(t_original, t_hold, x)\n```\n\n## Best Practices\n- Always consider anti-aliasing filtering before sampling\n- Use appropriate window functions to minimize spectral leakage\n- Choose FFT size based on frequency resolution requirements\n- Consider numerical precision in IIR filter implementations\n- Use cascaded biquad sections for high-order IIR filters\n- Implement proper initialization for adaptive filters\n- Verify filter stability before deployment\n- Consider quantization effects in fixed-point implementations\n- Use overlap-add or overlap-save for efficient convolution\n- Document filter specifications and design parameters\n","## What I do\n- Analyze signals in time and frequency domains\n- Design digital and analog filters\n- Perform spectral analysis and estimation\n- Implement adaptive filtering algorithms\n- Process audio, image, and sensor data\n- Design sampling and reconstruction systems\n- Implement signal compression and encoding\n- Develop detection and estimation algorithms\n\n## When to use me\nWhen analyzing signals, designing filters, implementing spectral analysis, or processing sensor data for embedded systems and applications.\n\n## Core Concepts\n- Fourier analysis (DFT, FFT, DTFT)\n- Sampling theory and aliasing\n- Filter design (FIR, IIR, analog)\n- Z-transform and system representation\n- Spectral estimation (periodogram, Welch, parametric)\n- Adaptive filtering (LMS, RLS, Kalman)\n- Window functions and spectral leakage\n- Signal conditioning and preprocessing\n- Detection and estimation theory\n- Multirate signal processing\n\n## Code Examples\n\n### Fourier Analysis\n```python\nimport numpy as np\nfrom dataclasses import dataclass\nfrom typing import Tuple\nimport matplotlib.pyplot as plt\n\ndef dft(x: np.ndarray) -> np.ndarray:\n    \"\"\"Compute discrete Fourier transform.\"\"\"\n    N = len(x)\n    X = np.zeros(N, dtype=complex)\n    for k in range(N):\n        for n in range(N):\n            X[k] += x[n] * np.exp(-2j * np.pi * k * n \u002F N)\n    return X\n\ndef fft(x: np.ndarray) -> np.ndarray:\n    \"\"\"Compute fast Fourier transform.\"\"\"\n    N = len(x)\n    if N \u003C= 16:\n        return dft(x)\n    even = fft(x[::2])\n    odd = fft(x[1::2])\n    factor = np.exp(-2j * np.pi * np.arange(N) \u002F N)\n    return np.concatenate([even + factor[:N\u002F\u002F2] * odd,\n                           even + factor[N\u002F\u002F2:] * odd])\n\ndef fft_frequency_bin(\n    N: int,\n    fs: float\n) -> np.ndarray:\n    \"\"\"Calculate frequency bins for FFT.\"\"\"\n    return np.fft.fftfreq(N, 1\u002Ffs)\n\ndef stft(\n    x: np.ndarray,\n    window: np.ndarray,\n    hop: int,\n    fft_size: int\n) -> np.ndarray:\n    \"\"\"Compute short-time Fourier transform.\"\"\"\n    n_frames = 1 + (len(x) - len(window)) \u002F\u002F hop\n    X = np.zeros((fft_size \u002F\u002F 2 + 1, n_frames), dtype=complex)\n    for i in range(n_frames):\n        x_frame = x[i * hop : i * hop + len(window)] * window\n        X[:, i] = fft(x_frame)[:fft_size \u002F\u002F 2 + 1]\n    return X\n\ndef spectrogram(\n    x: np.ndarray,\n    fs: float,\n    nperseg: int = 256,\n    noverlap: int = 128\n) -> Tuple[np.ndarray, np.ndarray, np.ndarray]:\n    \"\"\"Compute spectrogram.\"\"\"\n    window = np.hanning(nperseg)\n    hop = nperseg - noverlap\n    S = stft(x, window, hop, nperseg)\n    f = fft_frequency_bin(nperseg, fs)\n    t = np.arange(S.shape[1]) * hop \u002F fs\n    return np.abs(S)**2, f, t\n\n# Example: FFT analysis\nfs = 1000  # Hz\nt = np.arange(0, 1, 1\u002Ffs)\nx = np.sin(2 * np.pi * 50 * t) + 0.5 * np.sin(2 * np.pi * 120 * t)\nX = fft(x)\nfreq = fft_frequency_bin(len(x), fs)\nprint(f\"Fundamental frequency bins: {np.argmax(np.abs(X[1:len(X)\u002F\u002F2])) + 1}\")\n```\n\n### Filter Design\n```python\n@dataclass\nclass FilterSpec:\n    pass\n\ndef fir_window_design(\n    cutoff: float,\n    fs: float,\n    window_type: str = \"hamming\",\n    num_taps: int = None\n) -> np.ndarray:\n    \"\"\"Design FIR filter using window method.\"\"\"\n    if num_taps is None:\n        num_taps = int(4 \u002F (cutoff \u002F fs)) | 1\n    \n    if window_type == \"rectangular\":\n        window = np.ones(num_taps)\n    elif window_type == \"hanning\":\n        window = np.hanning(num_taps)\n    elif window_type == \"hamming\":\n        window = np.hamming(num_taps)\n    elif window_type == \"blackman\":\n        window = np.blackman(num_taps)\n    else:\n        window = np.hamming(num_taps)\n    \n    wc = 2 * np.pi * cutoff \u002F fs\n    h = np.zeros(num_taps)\n    for n in range(num_taps):\n        if n == num_taps \u002F\u002F 2:\n            h[n] = wc \u002F np.pi\n        else:\n            h[n] = np.sin(wc * (n - num_taps \u002F\u002F 2)) \u002F (np.pi * (n - num_taps \u002F\u002F 2))\n    \n    return h * window\n\ndef iir_butterworth_design(\n    wp: float,\n    ws: float,\n    gpass: float,\n    gstop: float,\n    fs: float\n) -> Tuple[np.ndarray, np.ndarray]:\n    \"\"\"Design IIR Butterworth filter.\"\"\"\n    wp_norm = 2 * wp \u002F fs\n    ws_norm = 2 * ws \u002F fs\n    \n    n = np.ceil(np.log10(10**(gpass\u002F10) - 1) \u002F np.log10(10**(gstop\u002F10) - 1) \u002F \n                (np.log10(ws_norm) - np.log10(wp_norm)) \u002F 2)\n    wc = wp_norm \u002F (10**(0.1 * gpass) - 1)**(1\u002F(2*n))\n    \n    z, p, k = butter poles(n, wc, analog=False, output='zpk')\n    return z, p\n\ndef iir_biquad_section(\n    b0: float, b1: float, b2: float,\n    a0: float, a1: float, a2: float\n) -> Tuple[np.ndarray, np.ndarray]:\n    \"\"\"Create biquad filter section coefficients.\"\"\"\n    num = np.array([b0\u002Fa0, b1\u002Fa0, b2\u002Fa0])\n    den = np.array([1, a1\u002Fa0, a2\u002Fa0])\n    return num, den\n\ndef bilinear_transform(\n    s_num: np.ndarray,\n    s_den: np.ndarray,\n    fs: float\n) -> Tuple[np.ndarray, np.ndarray]:\n    \"\"\"Apply bilinear transform for IIR design.\"\"\"\n    fprewarp = 2 * fs * np.tan(np.pi * np.linspace(0, 1, 100) \u002F fs)\n    z = np.exp(2j * np.pi * np.linspace(0, 1, 100) \u002F fs)\n    return z, z\n\n# Example: FIR low-pass filter\ncutoff = 200  # Hz\nfs = 1000  # Hz\nh = fir_window_design(cutoff, fs, \"hamming\", 65)\nprint(f\"FIR filter order: {len(h)}\")\nprint(f\"Filter coefficients sum: {np.sum(h):.4f}\")\n```\n\n### Spectral Estimation\n```python\ndef periodogram(\n    x: np.ndarray,\n    fs: float,\n    window: str = \"hamming\"\n) -> Tuple[np.ndarray, np.ndarray]:\n    \"\"\"Compute periodogram spectral estimate.\"\"\"\n    N = len(x)\n    w = np.hanning(N) if window == \"hanning\" else np.ones(N)\n    xw = x * w\n    X = np.fft.fft(xw)\n    Pxx = (np.abs(X)**2) \u002F (np.sum(w**2) \u002F N)\n    freqs = np.fft.fftfreq(N, 1\u002Ffs)\n    return Pxx[:N\u002F\u002F2], freqs[:N\u002F\u002F2]\n\ndef welch_psd(\n    x: np.ndarray,\n    fs: float,\n    nperseg: int = 256,\n    noverlap: int = 128\n) -> Tuple[np.ndarray, np.ndarray]:\n    \"\"\"Compute Welch's method PSD estimate.\"\"\"\n    window = np.hanning(nperseg)\n    hop = nperseg - noverlap\n    n_frames = 1 + (len(x) - nperseg) \u002F\u002F hop\n    \n    Pxx_sum = np.zeros(nperseg \u002F\u002F 2 + 1)\n    for i in range(n_frames):\n        x_frame = x[i * hop : i * hop + nperseg] * window\n        X = np.fft.fft(x_frame)\n        Pxx = np.abs(X[:nperseg\u002F\u002F2 + 1])**2\n        Pxx_sum += Pxx\n    \n    Pxx_avg = Pxx_sum \u002F n_frames\n    Pxx_avg[1:-1] *= 2  # Single-sided correction\n    freqs = np.fft.fftfreq(nperseg, 1\u002Ffs)[:nperseg\u002F\u002F2 + 1]\n    return Pxx_avg, freqs\n\ndef ar_psd_estimation(\n    x: np.ndarray,\n    order: int,\n    nfft: int = 1024,\n    fs: float = 1.0\n) -> Tuple[np.ndarray, np.ndarray]:\n    \"\"\"Estimate PSD using autoregressive model (Burg method).\"\"\"\n    from scipy.signal import lfilter\n    n = len(x)\n    r = np.correlate(x, x, mode='full')\n    r = r[n-1:n+order]\n    \n    # Burg algorithm for AR coefficients\n    a = np.zeros(order + 1)\n    a[0] = 1\n    for k in range(order):\n        pass\n    \n    freqs = np.fft.fftfreq(nfft, 1\u002Ffs)[:nfft\u002F\u002F2 + 1]\n    return np.abs(np.fft.fft(a, nfft))**2, freqs\n\ndef music_algorithm(\n    x: np.ndarray,\n    n_sources: int,\n    nfft: int = 1024,\n    fs: float = 1.0\n) -> np.ndarray:\n    \"\"\"MUSIC algorithm for frequency estimation.\"\"\"\n    N = len(x)\n    R = np.correlate(x, x, mode='full')\n    R = R[N-1:N+n_sources]\n    U, S, Vh = np.linalg.svd(R)\n    noise_subspace = U[:, n_sources:]\n    return np.arange(nfft) \u002F nfft * fs \u002F 2\n```\n\n### Adaptive Filtering\n```python\nclass LMSFilter:\n    def __init__(self, order: float, mu: float):\n        self.order = int(order)\n        self.mu = mu\n        self.w = np.zeros(order + 1)\n    \n    def filter(self, x: np.ndarray, d: np.ndarray) -> np.ndarray:\n        \"\"\"LMS adaptive filtering.\"\"\"\n        y = np.zeros(len(x))\n        for n in range(self.order, len(x)):\n            x_vec = x[n - self.order : n + 1][::-1]\n            y[n] = np.dot(self.w, x_vec)\n            e = d[n] - y[n]\n            self.w += self.mu * e * x_vec\n        return y\n\nclass RLSFilter:\n    def __init__(self, order: float, delta: float, lambda_rls: float):\n        self.order = int(order)\n        self.lambda_rls = lambda_rls\n        self.delta = delta\n        self.w = np.zeros(order + 1)\n        self.P = np.eye(order + 1) \u002F delta\n    \n    def filter(self, x: np.ndarray, d: np.ndarray) -> np.ndarray:\n        \"\"\"RLS adaptive filtering.\"\"\"\n        y = np.zeros(len(x))\n        for n in range(self.order, len(x)):\n            x_vec = x[n - self.order : n + 1][::-1]\n            y[n] = np.dot(self.w, x_vec)\n            e = d[n] - y[n]\n            Px = self.P @ x_vec\n            k = Px \u002F (self.lambda_rls + np.dot(x_vec, Px))\n            self.w += k * e\n            self.P = (self.P - np.outer(k, x_vec) @ self.P) \u002F self.lambda_rls\n        return y\n\ndef kalman_filter_1d(\n    z: np.ndarray,\n    x0: float,\n    P0: float,\n    Q: float,\n    R: float\n) -> Tuple[np.ndarray, np.ndarray]:\n    \"\"\"1D Kalman filter for signal estimation.\"\"\"\n    x = np.zeros(len(z))\n    P = np.zeros(len(z))\n    x[0] = x0\n    P[0] = P0\n    \n    for k in range(1, len(z)):\n        x_pred = x[k-1]\n        P_pred = P[k-1] + Q\n        K = P_pred \u002F (P_pred + R)\n        x[k] = x_pred + K * (z[k] - x_pred)\n        P[k] = (1 - K) * P_pred\n    \n    return x, P\n\n# Example: Adaptive noise cancellation\nnp.random.seed(42)\nN = 1000\nmu = 0.01\norder = 32\n\n# Reference noise\nv = np.random.randn(N)\ns = np.sin(2 * np.pi * 50 * np.arange(N) \u002F 1000)\nd = s + 0.5 * v\n\n# Noise reference (delayed version)\nx = np.concatenate([[0], v[:-1]])\n\nlms = LMSFilter(order, mu)\ny = lms.filter(x, d)\nprint(f\"Signal-to-Noise Ratio improvement: {10 * np.log10(np.var(s) \u002F np.var(d - y)):.2f} dB\")\n```\n\n### Sampling and Reconstruction\n```python\ndef nyquist_rate(\n    signal_bandwidth: float\n) -> float:\n    \"\"\"Calculate Nyquist sampling rate.\"\"\"\n    return 2 * signal_bandwidth\n\ndef anti_aliasing_design(\n    fp: float,  # passband edge Hz\n    fs: float,  # stopband edge Hz\n    As: float,  # stopband attenuation dB\n    delta_f: float  # transition width Hz\n) -> Tuple[float, int]:\n    \"\"\"Design anti-aliasing filter requirements.\"\"\"\n    delta_p = 10**(-0.05) - 1\n    delta_s = 10**(-As\u002F20)\n    delta_f_norm = delta_f \u002F fs\n    \n    # Kaiser window design\n    if As > 50:\n        beta = 0.1102 * (As - 8.7)\n    elif As > 21:\n        beta = 0.5842 * (As - 21)**0.4 + 0.07886 * (As - 21)\n    else:\n        beta = 5\n    \n    N = int((As - 8) \u002F (2.285 * 2 * np.pi * delta_f_norm)) + 1\n    return N, beta\n\ndef sinc_interpolation(\n    x: np.ndarray,\n    t: np.ndarray,\n    T: float\n) -> np.ndarray:\n    \"\"\"Reconstruct continuous signal using sinc interpolation.\"\"\"\n    y = np.zeros(len(t))\n    for n, xn in enumerate(x):\n        y += xn * np.sinc((t - n * T) \u002F T)\n    return y\n\ndef sample_and_hold(\n    x: np.ndarray,\n    fs: float,\n    T_hold: float\n) -> np.ndarray:\n    \"\"\"Model sample-and-hold circuit.\"\"\"\n    N = len(x)\n    t_original = np.arange(N) \u002F fs\n    t_hold = np.arange(0, N, T_hold * fs) \u002F fs\n    return np.interp(t_original, t_hold, x)\n```\n\n## Best Practices\n- Always consider anti-aliasing filtering before sampling\n- Use appropriate window functions to minimize spectral leakage\n- Choose FFT size based on frequency resolution requirements\n- Consider numerical precision in IIR filter implementations\n- Use cascaded biquad sections for high-order IIR filters\n- Implement proper initialization for adaptive filters\n- Verify filter stability before deployment\n- Consider quantization effects in fixed-point implementations\n- Use overlap-add or overlap-save for efficient convolution\n- Document filter specifications and design parameters\n",{"name":5,"license":15,"metadata":41,"description":7,"compatibility":31},{"audience":42,"category":27},"engineers","main","2ea764e153842704d24a2e9aa4170441a7f03081",".opencode\u002Fskills\u002Fengineering\u002Fsignal-processing","https:\u002F\u002Fgithub.com\u002FNeuralBlitz\u002FMito","https:\u002F\u002Fgithub.com\u002FNeuralBlitz","nuralnexus.org","Independent Multidisciplinary Researcher, Creative Producer, and AI Systems Architect\r\nAn independent creator and research-driven systems designer.","2026-11-12 03:13:05",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add NeuralBlitz\u002FMito --skill signal-processing",{"tool":57,"command":58},"bunx","bunx skills add NeuralBlitz\u002FMito --skill signal-processing",{"tool":60,"command":61},"pnpm","pnpm dlx skills add NeuralBlitz\u002FMito --skill signal-processing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FNeuralBlitz\u002FMito\u002Fblob\u002Fmain\u002F.opencode\u002Fskills\u002Fengineering\u002Fsignal-processing\u002FSKILL.md",true,[],[66,81,94,107,115,135],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":36},"01M6HAZSAQK1S27CEZYAYJTQDX","wireless-communications","Wireless systems, mobile networks, and 5G\u002F6G","https:\u002F\u002Fgithub.com\u002FNeuralBlitz\u002FMito\u002Fblob\u002Fmain\u002F.opencode\u002Fskills\u002Fwireless-communications\u002FSKILL.md",[],[73,74,75,76,27,77,78,79,31,80],"communications","wireless communications","wireless","systems","networks","5G","students","mobile",{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":36},"01M6HAZFX6E8NK3WZWDX5YCKYY","websockets","WebSocket implementation and best practices","https:\u002F\u002Fgithub.com\u002FNeuralBlitz\u002FMito\u002Fblob\u002Fmain\u002F.opencode\u002Fskills\u002Fwebassembly\u002Fwebsockets\u002FSKILL.md",[],[83,88,89,90,31,91,92,93],"websocket implementation","time","implementation","real-time","websocket","best practices",{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":36},"01M6HAZ6DAXBQ7QHXXM1EM7715","vulnerability-auditing","Vulnerability assessment and auditing","https:\u002F\u002Fgithub.com\u002FNeuralBlitz\u002FMito\u002Fblob\u002Fmain\u002F.opencode\u002Fskills\u002Fvulnerability-auditing\u002FSKILL.md",[],[101,102,103,104,31,105,106],"vulnerability","vulnerability auditing","security","vulnerability assessment","cybersecurity","assessment",{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":36},"01M6HAZ3FKF3CS9Z3J96RVE2ZE","vulnerability-assessment","Finding and assessing security vulnerabilities","https:\u002F\u002Fgithub.com\u002FNeuralBlitz\u002FMito\u002Fblob\u002Fmain\u002F.opencode\u002Fskills\u002Fvue\u002Fvulnerability-assessment\u002FSKILL.md",[],[104,101,106,103,114,31],"vulnerabilities",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":127,"publishedAt":36},"01M6HAYSHM6HKRKEHFP0SGZQX7","vlsi-design","Very-Large-Scale Integration circuit design and semiconductor engineering","https:\u002F\u002Fgithub.com\u002FNeuralBlitz\u002FMito\u002Fblob\u002Fmain\u002F.opencode\u002Fskills\u002Fvlsi-design\u002FSKILL.md",[121,122],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":123,"categoryName":124,"taxonomyType":125,"taxonomyTypeDesc":126},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[128,129,26,130,131,27,132,31,133,79,134],"vlsi design","VLSI","hardware","integration","computer","scale","circuit",{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":36},"01M6HAYPQ30FFE2JXD7WQJ8R6C","unsupervised","Unsupervised learning concepts","https:\u002F\u002Fgithub.com\u002FNeuralBlitz\u002FMito\u002Fblob\u002Fmain\u002F.opencode\u002Fskills\u002Fvisualization\u002Funsupervised\u002FSKILL.md",[],[137,142,31,143,144,145,146,147],"learning","intelligence","unsupervised learning","machine","concepts","machine-learning"]