Algorithmadvanced
Sum of coherent systems
Also called SOCS, Cobb decomposition.
Cobb's fast lithography simulation that eigendecomposes the TCC and approximates the aerial image by a few coherent kernels convolved with the mask.
- Time
- O(S N^2 + w N^3) buildO(K n log n) query
- Space
- O(N^2 + K n) extra
- Where
- K = the number of kernels kept; N = the number of frequencies in the band of the TCC; S = the number of source points; n = the number of image points; w = the number of Jacobi sweeps
- Model
- Word RAM
- Properties
- deterministicnot exactofflineiterative
- Evidence
- Proof sketchCode in 1 languages
- Origin
- Nicolas Bailey Cobb, 1998
The sum of coherent systems, or SOCS, computes the aerial image of a photomask under partially coherent light as a weighted sum of a few coherent images. It starts from the Hopkins imaging model, where the image is a quadratic form in the mask spectrum with a Hermitian positive semidefinite kernel, the transmission cross coefficient (TCC). The eigendecomposition of the TCC turns the quadratic form into a sum of squared moduli of linear filters of the mask, and keeping the largest eigenvalues gives an approximation whose error is set by the eigenvalues left out. Cobb named the method and made it the engine of fast model-based optical proximity correction. That page shows where SOCS sits in the correction loop; this page gives the algorithm, proves that it is exact at full rank, and bounds the error of the truncation.
In plain words
Partially coherent light comes from many source points at once. Each point makes its own sharp image of the mask, and the camera sees the sum of their brightnesses. Computing one image per source point works, but it needs many images.
The trick is to change the basis. The light that the source and lens let through can be described by a table that does not depend on the mask. Breaking that table into its eigenvectors gives a new set of "virtual sources". Each one is still a sharp, coherent system: filter the mask, take the squared size of the result. But now the systems are sorted by how much light they carry, and the light falls off fast.
So a handful of filters gives nearly the whole image. The filters are computed once for a scanner setting and reused for every mask.
The problem
Work in one dimension with a mask of period ; two dimensions only change the index set. The mask has Fourier coefficients at the frequencies . The source is a set of points with weights , and the pupil is a function that vanishes for . Let be the frequencies in the band where the TCC can be nonzero, for a source of radius (the band limit of the Hopkins page). The TCC is the matrix
and the Hopkins image is
Input: the source, the pupil, the band, a number of kernels, a mask and the image points . Output: the image , an approximation of that uses coherent systems, together with the eigenvalues of , which measure the error.
The algorithm
SUM-OF-COHERENT-SYSTEMS(source J, pupil H, band f_1..f_N, K, mask, points x)- 1
T[a][b] ← Σ_s J(s) H(f_a + s) conj(H(f_b + s)) for all a, b - 2
(λ, V) ← eigenpairs of the Hermitian matrix T by complex Jacobi rotations - 3
sort the pairs so that λ_1 ≥ λ_2 ≥ ... ≥ λ_N - 4
keep the kernels (λ_j, v_j) for j = 1..K - 5
M(f_a) ← Fourier coefficients of the mask on the band - 6
for j = 1..K - 7
E_j(x) ← Σ_a v_j(a) M(f_a) e^{2πi f_a x} - 8
return I_K(x) = Σ_{j ≤ K} λ_j |E_j(x)|^2
Lines L1 to L4 are the setup, done once for a source, pupil and band. Lines L5 to L8 run for every mask. The vector is the spectrum of the th kernel , so line L7 is the convolution , computed as a pointwise product of spectra and one inverse fast Fourier transform on the image grid.
Line L2 uses the Jacobi eigenvalue algorithm in its complex Hermitian form. For a pivot with , the rotation acts on rows and columns and as , where makes the pivot real and with , and
zeroes it. The rotations sweep over all pairs until the off-diagonal part is negligible. Any Hermitian eigensolver can take its place, and for large one that finds only the top pairs is better (see the variants).
Example
Take units with , the ideal pupil on , period , and three source points with weight each, so . The band is , that is , and .
Source point passes the frequencies with : passes , passes and passes . Write , , for the indicator vectors of these sets. Then , and each entry is times the number of source points that pass both frequencies:
| 1 | 1 | 1 | 1 | 1 | 0 | 0 | |
| 1 | 2 | 2 | 2 | 2 | 1 | 0 | |
| 1 | 2 | 3 | 3 | 3 | 2 | 1 | |
| 0 | 1 | 2 | 2 | 2 | 2 | 1 | |
| 0 | 0 | 1 | 1 | 1 | 1 | 1 |
(entries times ). The rank is , since is a sum of three rank-one terms, and the trace is .
Eigenvalues by hand. The vector has , and , so . The even vectors and span an invariant plane: from the inner products , and ,
The matrix has trace and determinant , so its eigenvalues are . In order, , , , and . They add up to the trace . Jacobi gives the same values to .
Images. Take equal lines and spaces, on in each period, so , , and . At the center of the line, the edge, and the center of the space:
| direct Hopkins |
With three kernels the image is exact, since the rank is three. The second kernel is odd, and the mask is even about and , so vanishes there and adds only at the edge. One kernel is already within of the image, far below the guaranteed bound . The bound is reached only by the worst mask, as the correctness section shows.
Correctness
The full proof is in the correctness proof. Write the image at a point as with . Since is Hermitian and positive semidefinite (proved on the Hopkins page), the spectral theorem gives with . Then , so exactly, and the truncation error is
This gives three facts. The error is never negative, so underestimates the image. It is at most , which is at most for any mask with by Parseval. The factor is the spectral norm , and the bound is attained at by a mask whose band spectrum is a multiple of . Summed over the single-frequency masks, the error at any point is , the trace norm ; this is also the mean error for random coefficients with . By the theorem of Eckart and Young and its extension by Mirsky, is the best rank- approximation of in both norms, so no other coherent systems give a smaller spectral or trace norm of the kernel error . These norms are the worst and the summed image error only when is positive semidefinite. For another rank- kernel the summed error is the trace of , not its trace norm, and it can be smaller: and the all-ones matrix as give 0, against 1 for . Finally, for source points, is a sum of rank-one matrices, so and kernels are exact.
Proof: The eigendecomposition of the TCC gives the sum of coherent systems, with truncation error set by the tail eigenvaluesfull
Setting. Let be the band frequencies, the weights of finitely many source points , and the pupil. The TCC is , and for mask coefficients the Hopkins image is
For a point define the vector by . Write .
Lemma 1 (the image is a quadratic form). .
Proof. , which is the Hopkins sum.
Lemma 2 (structure of ). Let have entries . Then . Hence is Hermitian, positive semidefinite, and of rank at most the number of source points.
Proof. The entry of is , which gives the sum. Each is Hermitian, and , so a sum with weights is Hermitian and positive semidefinite. Each term has rank at most one, and the rank of a sum is at most the sum of the ranks.
By the spectral theorem for Hermitian matrices, with an orthonormal basis and real , and by Lemma 2. At most of the are nonzero. For let , and define the coherent fields and the truncated image as in lines L7 and L8:
Lemma 3. , so .
Proof. . Then .
Theorem 1 (SOCS is exact at full rank). for every mask and every . In particular whenever , and so whenever .
Proof. By Lemma 1 and the eigendecomposition, , and Lemma 3 gives each term. The terms with have .
Theorem 2 (pointwise error). For every mask and every ,
with . The upper bound is attained: if for all , then at the error equals .
Proof. The identity follows from Theorem 1 minus the definition of , with Lemma 3. Every term is at least , which gives the lower bound. For the upper bound, for , so the sum is at most , by Parseval's identity in the orthonormal basis . For the attaining mask, at , so is for and otherwise, and the error is .
So the worst error per unit of mask energy is , the spectral norm of , whose eigenvalues are and .
Corollary 3 (masks of bounded amplitude). Let the mask have period and , with for distinct frequencies . Then for all . The same holds for a sampled mask with and the discrete coefficients , as long as the band integers are distinct modulo the number of samples .
Proof. By Parseval's identity for Fourier series, . For the sampled mask, the discrete Parseval identity gives , and the band uses each residue at most once. Apply Theorem 2.
Theorem 4 (the trace norm is the summed error). Let be the mask with and all other coefficients , a single plane wave. For every ,
Also, if is a random vector with , then .
Proof. For the mask , is times the th unit vector, so by Theorem 2 the error is ; the phase cancels. The sum over is the trace of , which is the sum of its eigenvalues . These are at least , so the trace equals the trace norm, the sum of the singular values. For the random case, with .
Optimality (cited). For every matrix of rank at most , and , with equality for . For the spectral and Frobenius norms this is the theorem of Eckart and Young (1936), and Mirsky (1960) extended it to every unitarily invariant norm, which includes the trace norm. Any coherent systems with weights and kernel spectra give the image with of rank at most . So, measured by these two norms of the kernel error, the SOCS truncation is the best choice of coherent systems. This part is cited, not proved here.
The eigensolver (lines L2 and L3). The implementation uses cyclic complex Jacobi rotations. We prove that each rotation zeroes its pivot, preserves the eigenvalues, and lowers the off-diagonal mass; the convergence of the cyclic sweeps is cited from the Jacobi eigenvalue algorithm.
One rotation. Let be Hermitian with pivot , , and write , , both real. Let be the identity except on rows and columns , where it is with and , . Then is unitary, and is Hermitian with the same eigenvalues. On the block, , and the off-diagonal entry of is
With and , this is zero if and only if . The roots are . The value , with , is one of them: multiply the numerator and the denominator by to get . It is the root of smaller size, so and the rotation angle is at most . Then and zero the pivot.
Off-diagonal mass. Let . The Frobenius norm is invariant under . Entries outside rows and columns do not change. For , the pair is multiplied by the unitary block, so , and the same for columns. The block keeps its Frobenius norm, , and now has a zero off-diagonal, so its diagonal gains . Hence .
Output. After the rotations , the matrix is unitary and . Write with diagonal and the off-diagonal part. Then , and . The loop stops when for the tolerance . By Weyl's inequality, after sorting (line L3) each diagonal value differs from the corresponding eigenvalue of by at most . So Theorems 1 to 4 hold for the computed pairs up to an additive error of at most in the image. The tests check and to , and the full-rank image against the direct Hopkins sum and Abbe's method to .
Example check. For the three-point source of the page, Lemma 2 gives of rank , and the eigenvalues and sum to . By Theorem 1, three kernels give the exact image, as the table on the page shows.
Complexity
- Setup. Line L1 adds rank-one terms of size : . Each Jacobi sweep visits pairs at each, so sweeps cost . Cyclic Jacobi converges quadratically in the end, so is small in practice (it is under in the tests). Storage is .
- Per mask. Line L5 is one forward transform. Each kernel needs products and one inverse transform onto image points, , so the image costs . The direct Hopkins sum needs products per image instead, and Abbe's method one transform per source point, . In two dimensions grows with the square of the period while stays near ten for typical settings, which is the source of the speed-up.
Properties
- Exact at full rank. With the output is the Hopkins image. With smaller it is a lower approximation, which is why the property
exactis false. - Monotone in . Each added kernel adds , so the error falls with at every point.
- Mask independent setup. The kernels depend only on the source, pupil and band.
- Kernels are defined up to phase. If is an eigenvector, so is , and does not change. Equal eigenvalues allow any orthonormal basis of the eigenspace.
- Deterministic. The eigensolver and the transforms are deterministic.
Variants and improvements
- Singular value decomposition. Cobb computed the kernels with the singular value decomposition of the TCC matrix. For a Hermitian positive semidefinite matrix it equals the eigendecomposition.
- Top- eigensolvers. Only pairs are needed, so power iteration with deflation, subspace iteration or Lanczos replace the full solver when is large. Matrix-vector products with cost through its factored form .
- Factored form. The same factored form shows that the kernels are the left singular vectors of the matrix with columns , and the eigenvalues are the squared singular values. A thin decomposition of that matrix costs and avoids forming .
- Optimal coherent approximation. Pati and Kailath (1994) kept one or a few coherent systems of this kind to turn mask design into a phase retrieval problem.
- Kernels in space. Instead of transforms, each kernel can be convolved once with basic shapes and stored in tables, so that the field of a polygon mask is a sum of table values. This suits sparse evaluation at the sites used by optical proximity correction.
- Gradients for mask optimization. Since , the gradient of a weighted image with respect to a real mask is , with . So one gradient costs about two transforms per kernel. Inverse lithography uses this form.
- Focus and dose. Defocus changes the pupil phase, so each focus setting has its own TCC and kernels.
When to use it
Use it when many masks are imaged with the same optics: proximity correction, inverse lithography and lithography verification over a full chip. Choose from the eigenvalues, for example the least with below a tolerance times the trace. When the source itself changes at every step, as in source and mask optimization, the setup is repeated each time, and Abbe's method over source points is often simpler.
Pitfalls
- Band too small. The band must reach . A smaller band drops terms of that are not small, and no choice of recovers them.
- Error in the image, not the edge. The bound is on intensity. Where the image is flat near the resist threshold, a small intensity error moves the printed edge far.
- Periodic boundaries. The transform treats the mask as periodic. Pad the simulation region by the reach of the kernels, or a feature wraps around.
- Tiny negative eigenvalues. Rounding can give eigenvalues just below zero. Set them to zero; they do not belong to the kernel set.
- Comparing kernels. Kernels from two settings may differ by a phase or by a rotation within an eigenspace. Compare images or projectors , not raw kernels.
- Normalization. Divide by the clear-field image , as on the Hopkins page, before applying a resist threshold.
Implementations
Each implementation follows the pseudocode above. A comment @line links a line of code to a line of the pseudocode. Point at a line of the pseudocode to see the matching code. The build runs the native tests of each language.
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/sum-of-coherent-systems/. The authors are listed in prov/5NQR8Z.jsonl.
"""Sum of coherent systems (SOCS) for a one-dimensional periodic mask.
Units: frequencies are in units of NA / wavelength, lengths in wavelength / NA. The mask
has period P and is given by samples m[0..N-1] at x = n P / N; its spectrum is the
discrete Fourier transform M(k) = (1/N) sum_n m[n] exp(-2 pi i k n / N), at the
frequency k / P. The source is a list of points (s, J) with weights J >= 0. The pupil
is a function of the frequency, zero outside [-1, 1].
The transmission cross coefficient on the band of integers k is
T[k1][k2] = sum over source points of J * H(k1/P + s) * conj(H(k2/P + s)),
a Hermitian positive semidefinite matrix. Its eigendecomposition
T = sum_j lam_j v_j v_j^* gives I(x) = sum_j lam_j |sum_k v_j[k] M(k) e^{2 pi i k x / P}|^2.
"""
import cmath
import math
def ideal_pupil(defocus=0.0, coma=0.0):
"""Pupil 1 on |f| <= 1 times a phase exp(2 pi i (defocus f^2 + coma f^3))."""
def H(f):
if abs(f) > 1 + 1e-12:
return 0j
return cmath.exp(2j * math.pi * (defocus * f * f + coma * f ** 3))
return H
def source_points(sigma, count):
"""count equally weighted points spread evenly over [-sigma, sigma], total weight 1."""
if count == 1:
return [(0.0, 1.0)]
return [(-sigma + 2 * sigma * i / (count - 1), 1.0 / count) for i in range(count)]
def band(P, sigma):
"""The integers k with |k / P| <= 1 + sigma, where T can be nonzero."""
kmax = int(math.floor((1 + sigma) * P + 1e-9))
return list(range(-kmax, kmax + 1))
def tcc(ks, P, source, H):
n = len(ks)
T = [[0j] * n for _ in range(n)]
for s, w in source:
h = [H(k / P + s) for k in ks]
for a in range(n):
if h[a] == 0:
continue
for b in range(n):
T[a][b] += w * h[a] * h[b].conjugate() # @line L1
return T
def off_norm(A):
n = len(A)
return math.sqrt(sum(abs(A[i][j]) ** 2 for i in range(n) for j in range(n) if i != j))
def jacobi_hermitian(T, tol=1e-14, max_sweeps=60):
"""Eigenvalues and eigenvectors of a Hermitian matrix by cyclic complex Jacobi rotations.
Returns (lams, V) with T = V diag(lams) V^*, V unitary, columns the eigenvectors.
Each rotation U = W R first turns a[p][q] real with the phase W = diag(1, e^{-i phi})
and then zeroes it with a real plane rotation R.
"""
n = len(T)
A = [row[:] for row in T]
V = [[1 + 0j if i == j else 0j for j in range(n)] for i in range(n)]
scale = math.sqrt(sum(abs(A[i][j]) ** 2 for i in range(n) for j in range(n))) or 1.0
for _ in range(max_sweeps):
if off_norm(A) <= tol * scale:
break
for p in range(n - 1):
for q in range(p + 1, n):
g = A[p][q]
if abs(g) <= 1e-300:
continue
r = abs(g)
e = g / r # e^{i phi}
theta = (A[q][q].real - A[p][p].real) / (2 * r)
t = (1.0 if theta >= 0 else -1.0) / (abs(theta) + math.sqrt(theta * theta + 1))
c = 1 / math.sqrt(t * t + 1)
s = t * c
# U = [[c, s], [-s e^{-i phi}, c e^{-i phi}]] acting on columns p and q.
upp, upq = c, s
uqp, uqq = -s * e.conjugate(), c * e.conjugate()
for k in range(n):
akp, akq = A[k][p], A[k][q]
A[k][p] = akp * upp + akq * uqp
A[k][q] = akp * upq + akq * uqq
for k in range(n):
apk, aqk = A[p][k], A[q][k]
A[p][k] = upp * apk + uqp.conjugate() * aqk
A[q][k] = upq * apk + uqq.conjugate() * aqk
A[p][q] = A[q][p] = 0j
for k in range(n):
vkp, vkq = V[k][p], V[k][q]
V[k][p] = vkp * upp + vkq * uqp
V[k][q] = vkp * upq + vkq * uqq # @line L2
lams = [A[i][i].real for i in range(n)]
return lams, V
def socs_kernels(T, K):
"""The K largest eigenvalues of T, with their eigenvectors (the kernel spectra)."""
lams, V = jacobi_hermitian(T)
order = sorted(range(len(lams)), key=lambda j: -lams[j]) # @line L3
n = len(T)
return [(lams[j], [V[i][j] for i in range(n)]) for j in order[:K]] # @line L4
def mask_spectrum(mask, ks):
N = len(mask)
return [sum(mask[n] * cmath.exp(-2j * math.pi * k * n / N) for n in range(N)) / N for k in ks] # @line L5
def coherent_field(phi, M, ks, x, P):
return sum(p * m * cmath.exp(2j * math.pi * k * x / P) for p, m, k in zip(phi, M, ks))
def socs_image(kernels, M, ks, xs, P):
"""I_K(x) = sum_j lam_j |E_j(x)|^2 at the points xs."""
out = []
for x in xs:
total = 0.0
for lam, phi in kernels: # @line L6
E = coherent_field(phi, M, ks, x, P) # @line L7
total += lam * abs(E) ** 2
out.append(total) # @line L8
return out
def sum_of_coherent_systems(mask, P, source, H, K, xs):
"""Build the TCC, keep K kernels, and return (image at xs, all eigenvalues sorted)."""
ks = band(P, max(abs(s) for s, _ in source))
T = tcc(ks, P, source, H)
kernels = socs_kernels(T, len(ks))
M = mask_spectrum(mask, ks)
return socs_image(kernels[:K], M, ks, xs, P), [lam for lam, _ in kernels]
def hopkins_image(T, M, ks, xs, P):
"""The direct Hopkins double sum over pairs of frequencies."""
n = len(ks)
out = []
for x in xs:
e = [M[a] * cmath.exp(2j * math.pi * ks[a] * x / P) for a in range(n)]
total = sum(T[a][b] * e[a] * e[b].conjugate() for a in range(n) for b in range(n))
out.append(total.real)
return out
def abbe_image(source, H, M, ks, xs, P):
"""The image summed over source points, one coherent image per point."""
out = []
for x in xs:
total = 0.0
for s, w in source:
E = sum(H(k / P + s) * m * cmath.exp(2j * math.pi * k * x / P) for k, m in zip(ks, M))
total += w * abs(E) ** 2
out.append(total)
return out
test_sum_of_coherent_systems.py 185 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/sum-of-coherent-systems/. The authors are listed in prov/5NQR8Z.jsonl.
import cmath
import math
import random
from sum_of_coherent_systems import (
abbe_image,
band,
hopkins_image,
ideal_pupil,
jacobi_hermitian,
mask_spectrum,
socs_image,
socs_kernels,
source_points,
sum_of_coherent_systems,
tcc,
)
P = 4.0
SIGMA = 0.7
SOURCE = source_points(SIGMA, 9)
H = ideal_pupil(defocus=0.15, coma=0.05)
KS = band(P, SIGMA)
T = tcc(KS, P, SOURCE, H)
N = 48
XS = [P * i / N for i in range(N)]
def random_mask(rng):
"""A binary mask made of a few random openings on the sample grid."""
m = [0.0] * N
for _ in range(3):
a = rng.randrange(N)
for d in range(rng.randint(2, 10)):
m[(a + d) % N] = 1.0
return m
def test_tcc_is_hermitian_and_psd():
n = len(T)
for a in range(n):
for b in range(n):
assert abs(T[a][b] - T[b][a].conjugate()) < 1e-14
assert any(abs(T[a][b].imag) > 1e-3 for a in range(n) for b in range(n))
lams, _ = jacobi_hermitian(T)
assert min(lams) > -1e-12
def test_jacobi_reconstructs_random_hermitian():
rng = random.Random(1)
n = 12
A = [[0j] * n for _ in range(n)]
for i in range(n):
A[i][i] = complex(rng.uniform(-2, 2), 0)
for j in range(i + 1, n):
z = complex(rng.uniform(-1, 1), rng.uniform(-1, 1))
A[i][j], A[j][i] = z, z.conjugate()
lams, V = jacobi_hermitian(A)
for i in range(n):
for j in range(n):
vv = sum(V[k][i].conjugate() * V[k][j] for k in range(n))
assert abs(vv - (1 if i == j else 0)) < 1e-12
rec = sum(V[i][k] * lams[k] * V[j][k].conjugate() for k in range(n))
assert abs(rec - A[i][j]) < 1e-12
# The trace and the Frobenius norm are invariants.
assert abs(sum(lams) - sum(A[i][i].real for i in range(n))) < 1e-12
frob = sum(abs(A[i][j]) ** 2 for i in range(n) for j in range(n))
assert abs(sum(l * l for l in lams) - frob) < 1e-10
def test_full_socs_equals_direct_hopkins_and_abbe():
rng = random.Random(2)
kernels = socs_kernels(T, len(KS))
for _ in range(3):
mask = random_mask(rng)
M = mask_spectrum(mask, KS)
direct = hopkins_image(T, M, KS, XS, P)
socs = socs_image(kernels, M, KS, XS, P)
abbe = abbe_image(SOURCE, H, M, KS, XS, P)
for a, b, c in zip(direct, socs, abbe):
assert abs(a - b) < 1e-11
assert abs(a - c) < 1e-11
def test_rank_at_most_number_of_source_points():
kernels = socs_kernels(T, len(KS))
lams = [lam for lam, _ in kernels]
assert len(KS) > len(SOURCE)
assert all(abs(l) < 1e-12 for l in lams[len(SOURCE):])
assert lams == sorted(lams, reverse=True)
def test_truncation_error_against_tail_eigenvalues():
rng = random.Random(3)
kernels = socs_kernels(T, len(KS))
lams = [lam for lam, _ in kernels]
for _ in range(3):
mask = random_mask(rng)
M = mask_spectrum(mask, KS)
energy = sum(abs(m) ** 2 for m in M)
direct = hopkins_image(T, M, KS, XS, P)
for K in range(0, len(SOURCE) + 1):
approx = socs_image(kernels[:K], M, KS, XS, P)
tail_max = lams[K] if K < len(lams) else 0.0
for a, b in zip(direct, approx):
err = a - b
# 0 <= I - I_K <= lam_{K+1} * sum |M|^2 at every point.
assert -1e-11 <= err <= max(tail_max, 0.0) * energy + 1e-11
# Summed over the single-frequency masks e^{2 pi i k x / P}, the error at a point
# is exactly the sum of the tail eigenvalues (the trace norm of T - T_K).
for K in range(0, len(SOURCE) + 1):
total = 0.0
for idx, k in enumerate(KS):
M = [1.0 if j == idx else 0.0 for j in range(len(KS))]
x = 0.37
total += hopkins_image(T, M, KS, [x], P)[0] - socs_image(kernels[:K], M, KS, [x], P)[0]
assert abs(total - sum(lams[K:])) < 1e-11
def test_error_decreases_with_k():
rng = random.Random(4)
kernels = socs_kernels(T, len(KS))
mask = random_mask(rng)
M = mask_spectrum(mask, KS)
direct = hopkins_image(T, M, KS, XS, P)
prev = None
for K in range(0, len(SOURCE) + 1):
approx = socs_image(kernels[:K], M, KS, XS, P)
worst = max(a - b for a, b in zip(direct, approx))
if prev is not None:
assert worst <= prev + 1e-12
prev = worst
assert prev < 1e-11
def test_page_example():
source = [(-0.5, 1 / 3), (0.0, 1 / 3), (0.5, 1 / 3)]
Hi = ideal_pupil()
ks = band(2.0, 0.5)
assert ks == [-3, -2, -1, 0, 1, 2, 3]
T2 = tcc(ks, 2.0, source, Hi)
# The TCC entries are multiples of 1/3, as in the table on the page.
third = [
[1, 1, 1, 1, 1, 0, 0],
[1, 2, 2, 2, 2, 1, 0],
[1, 2, 3, 3, 3, 2, 1],
[1, 2, 3, 3, 3, 2, 1],
[1, 2, 3, 3, 3, 2, 1],
[0, 1, 2, 2, 2, 2, 1],
[0, 0, 1, 1, 1, 1, 1],
]
for a in range(7):
for b in range(7):
assert abs(T2[a][b] - third[a][b] / 3) < 1e-12
kernels = socs_kernels(T2, 7)
lams = [lam for lam, _ in kernels]
r = math.sqrt(137)
for got, want in zip(lams, [(13 + r) / 6, 2 / 3, (13 - r) / 6, 0, 0, 0, 0]):
assert abs(got - want) < 1e-12
# The second kernel is (1, 1, 0, 0, 0, -1, -1) / 2 up to a phase.
v2 = kernels[1][1]
assert abs(abs(sum(x * y for x, y in zip(v2, [0.5, 0.5, 0, 0, 0, -0.5, -0.5]))) - 1) < 1e-12
# Lines and spaces: m = 1 on [-1/2, 1/2] in each period 2, so M(k) = sin(pi k / 2) / (pi k).
M = [0.5 if k == 0 else math.sin(math.pi * k / 2) / (math.pi * k) for k in ks]
xs = [0.0, 0.5, 1.0]
direct = hopkins_image(T2, M, ks, xs, 2.0)
for got, want in zip(direct, [1.138611, 0.257505, 0.006842]):
assert abs(got - want) < 1e-6
i1 = socs_image(kernels[:1], M, ks, xs, 2.0)
i2 = socs_image(kernels[:2], M, ks, xs, 2.0)
i3 = socs_image(kernels[:3], M, ks, xs, 2.0)
for got, want in zip(i1, [1.138562, 0.249594, 0.004603]):
assert abs(got - want) < 1e-6
for got, want in zip(i2, [1.138562, 0.257099, 0.004603]):
assert abs(got - want) < 1e-6
assert all(abs(a - b) < 1e-12 for a, b in zip(i3, direct))
# The sampled mask through the whole pipeline agrees with the direct sum.
mask = [1.0 if i < 4 or i >= 12 else 0.0 for i in range(16)]
image, all_lams = sum_of_coherent_systems(mask, 2.0, source, Hi, 3, xs)
sampled = hopkins_image(T2, mask_spectrum(mask, ks), ks, xs, 2.0)
assert all(abs(a - b) < 1e-12 for a, b in zip(image, sampled))
assert all(abs(l) < 1e-12 for l in all_lams[3:])
History
Hopkins (1953) wrote partially coherent imaging with a kernel that does not depend on the object. Gamo (1964) treated the mutual intensity of partially coherent light as a Hermitian matrix and expanded it in eigenvectors. Pati and Kailath (1994) applied optimal coherent approximations of the Hopkins model to the design of phase-shifting masks. Cobb, in a 1995 Berkeley report and his 1998 thesis, called the decomposition the sum of coherent systems, computed it with the singular value decomposition of the TCC matrix, and built fast proximity correction on it. It became the standard aerial image engine of full-chip OPC tools.
References
- Nicolas Bailey Cobb, Fast Optical and Process Proximity Correction Algorithms for Integrated Circuit Manufacturing, PhD thesis, Department of Electrical Engineering and Computer Sciences, University of California at Berkeley, 1998, the decomposition of the Hopkins imaging equation into a sum of coherent systems (SOCS), computed from the matrix of transmission cross coefficients by the singular value decomposition, and its use for fast aerial image computation in proximity correction
- Hideya Gamo, Matrix treatment of partial coherence, Progress in Optics 3, 187 to 332, 1964, the mutual intensity of partially coherent light treated as a Hermitian matrix and expanded in its eigenvectors, the decomposition that SOCS starts from
- Y. C. Pati and T. Kailath, Phase-shifting masks for microlithography, automated design and mask requirements, Journal of the Optical Society of America A 11(9), 2438 to 2452, 1994, optimal coherent approximations of partially coherent imaging systems in the Hopkins model, used to reduce mask design to phase retrieval
- Carl Eckart and Gale Young, The approximation of one matrix by another of lower rank, Psychometrika 1(3), 211 to 218, 1936, the best approximation of a matrix by one of lower rank is the truncation of its singular value decomposition
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H1 sketch |
|
| Lean | L0 no Lean part |
|
| Code (python) | I0 not checked yet |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag 5NQR8Z Edit this page History Report an error Markdown